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
diff --git a/pimd/pim_hello.c b/pimd/pim_hello.c
index 73c50d4..94e7c94 100644
--- a/pimd/pim_hello.c
+++ b/pimd/pim_hello.c
@@ -124,12 +124,12 @@
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);
}
}
diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c
index 0df7422..51ce8c9 100644
--- a/pimd/pim_neighbor.c
+++ b/pimd/pim_neighbor.c
@@ -689,8 +689,8 @@
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 {
diff --git a/pimd/pim_time.c b/pimd/pim_time.c
index 7d4581d..b884efc 100644
--- a/pimd/pim_time.c
+++ b/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 @@
return result;
}
+#endif
static int gettime_monotonic(struct timeval *tv)
{
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index e18b7ac..74a60a5 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -548,7 +548,7 @@
}
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) ?