Browse Source

pimd: fix wtf code

 * pim_hello.c,
 * pim_neighbor.c: print pointers as %p
 * pim_time.c: comment out unused function
 * pim_zebra.c: wtf
David Lamparter 10 years ago
parent
commit
105ad8615d
4 changed files with 7 additions and 5 deletions
  1. 2 2
      pimd/pim_hello.c
  2. 2 2
      pimd/pim_neighbor.c
  3. 2 0
      pimd/pim_time.c
  4. 1 1
      pimd/pim_zebra.c

+ 2 - 2
pimd/pim_hello.c

@@ -124,12 +124,12 @@ static void tlv_trace_list(const char *label, const char *tlv_name,
   if (isset) {
     char src_str[100];
     pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
-    zlog_debug("%s: PIM hello option from %s on interface %s: %s size=%d list=%x",
+    zlog_debug("%s: PIM hello option from %s on interface %s: %s size=%d list=%p",
 	       label, 
 	       src_str, ifname,
 	       tlv_name,
 	       addr_list ? ((int) listcount(addr_list)) : -1,
-	       (unsigned) addr_list);
+	       (void *) addr_list);
   }
 }
 

+ 2 - 2
pimd/pim_neighbor.c

@@ -689,8 +689,8 @@ void pim_neighbor_update(struct pim_neighbor *neigh,
 
   if (neigh->prefix_list == addr_list) {
     if (addr_list) {
-      zlog_err("%s: internal error: trying to replace same prefix list=%u",
-	       __PRETTY_FUNCTION__, (unsigned) addr_list);
+      zlog_err("%s: internal error: trying to replace same prefix list=%p",
+	       __PRETTY_FUNCTION__, (void *) addr_list);
     }
   }
   else {

+ 2 - 0
pimd/pim_time.c

@@ -30,6 +30,7 @@
 
 #include "pim_time.h"
 
+#if 0
 static int pim_gettime(int clk_id, struct timeval *tv)
 {
   struct timespec ts;
@@ -58,6 +59,7 @@ static int pim_gettime(int clk_id, struct timeval *tv)
 
   return result;
 }
+#endif
 
 static int gettime_monotonic(struct timeval *tv)
 {

+ 1 - 1
pimd/pim_zebra.c

@@ -548,7 +548,7 @@ static int redist_read_ipv4_route(int command, struct zclient *zclient,
   }
 
   api.distance = CHECK_FLAG(api.message, ZAPI_MESSAGE_DISTANCE) ?
-    api.distance = stream_getc(s) :
+    stream_getc(s) :
     0;
 
   api.metric = CHECK_FLAG(api.message, ZAPI_MESSAGE_METRIC) ?