link_set: stub out olsr_print_link_set on #ifdef NODEBUG
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 1 Nov 2012 11:53:10 +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/link_set.c
src/link_set.h

index d6413ce..53a2219 100644 (file)
@@ -799,10 +799,10 @@ check_link_status(const struct hello_message *message, const struct interface *i
   return ret;
 }
 
+#ifndef NODEBUG
 void
 olsr_print_link_set(void)
 {
-#ifndef NODEBUG
   /* The whole function makes no sense without it. */
   struct link_entry *walker;
   const int addrsize = olsr_cnf->ip_version == AF_INET ? 15 : 39;
@@ -818,8 +818,8 @@ olsr_print_link_set(void)
                (double)walker->L_link_quality, get_link_entry_text(walker, '/', &lqbuffer1), get_linkcost_text(walker->linkcost,
                                                                                                         false, &lqbuffer2));
   } OLSR_FOR_ALL_LINK_ENTRIES_END(walker);
-#endif /* NODEBUG */
 }
+#endif /* NODEBUG */
 
 /*
  * called for every LQ HELLO message.
index b2b319c..9ae27f5 100644 (file)
@@ -138,7 +138,11 @@ int replace_neighbor_link_set(const struct neighbor_entry *, struct neighbor_ent
 int lookup_link_status(const struct link_entry *);
 void olsr_update_packet_loss_hello_int(struct link_entry *, olsr_reltime);
 void olsr_received_hello_handler(struct link_entry *entry);
+#ifndef NODEBUG
 void olsr_print_link_set(void);
+#else
+#define olsr_print_link_set() do { } while(0)
+#endif
 
 #endif /* _LINK_SET_H */