mpr_set: stub out olsr_print_mpr_set on #ifdef NODEBUG
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 1 Nov 2012 11:53:37 +0000 (12:53 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 1 Nov 2012 13:23:40 +0000 (14:23 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/mpr.c
src/mpr.h

index fabfe34..a81cd45 100644 (file)
--- a/src/mpr.c
+++ b/src/mpr.c
@@ -507,10 +507,10 @@ olsr_optimize_mpr_set(void)
   }
 }
 
+#ifndef NODEBUG
 void
 olsr_print_mpr_set(void)
 {
-#ifndef NODEBUG
   /* The whole function makes no sense without it. */
   struct neighbor_entry *a_neighbor;
 
@@ -528,8 +528,8 @@ olsr_print_mpr_set(void)
   } OLSR_FOR_ALL_NBR_ENTRIES_END(a_neighbor);
 
   OLSR_PRINTF(1, "\n");
-#endif /* NODEBUG */
 }
+#endif /* NODEBUG */
 
 /*
  * Local Variables:
index d93d6fa..5937928 100644 (file)
--- a/src/mpr.h
+++ b/src/mpr.h
 
 void olsr_calculate_mpr(void);
 
+#ifndef NODEBUG
 void olsr_print_mpr_set(void);
+#else
+#define olsr_print_mpr_set() do { } while(0)
+#endif
 
 #endif /* _OLSR_MPR */