pimd: fix format strings
* pim_igmp.c,
* pim_igmpv3.c,
* pim_pim.c,
* pim_tlv.c: use %zu / %zd for size_t/ssize_t
* pim_iface.c,
* pim_ifchannel.c,
* pim_mroute.c,
* pim_neighbor.c,
* pim_oil.c,
* pim_ssmpingd.c,
* pim_upstream.c: %zu for size_t
* pim_cmd.c: %zu + a few (long long) casts for int64_t
* pim_hello.c: %td for ptrdiff_t
diff --git a/pimd/pim_tlv.c b/pimd/pim_tlv.c
index 16b7e93..cb6b654 100644
--- a/pimd/pim_tlv.c
+++ b/pimd/pim_tlv.c
@@ -39,7 +39,7 @@
uint16_t option_len = 2;
if ((buf + PIM_TLV_OPTION_SIZE(option_len)) > buf_pastend) {
- zlog_warn("%s: buffer overflow: left=%d needed=%d",
+ zlog_warn("%s: buffer overflow: left=%zd needed=%d",
__PRETTY_FUNCTION__,
buf_pastend - buf, PIM_TLV_OPTION_SIZE(option_len));
return 0;
@@ -64,7 +64,7 @@
uint16_t option_len = 4;
if ((buf + PIM_TLV_OPTION_SIZE(option_len)) > buf_pastend) {
- zlog_warn("%s: buffer overflow: left=%d needed=%d",
+ zlog_warn("%s: buffer overflow: left=%zd needed=%d",
__PRETTY_FUNCTION__,
buf_pastend - buf, PIM_TLV_OPTION_SIZE(option_len));
return 0;
@@ -90,7 +90,7 @@
uint16_t option_len = 4;
if ((buf + PIM_TLV_OPTION_SIZE(option_len)) > buf_pastend) {
- zlog_warn("%s: buffer overflow: left=%d needed=%d",
+ zlog_warn("%s: buffer overflow: left=%zd needed=%d",
__PRETTY_FUNCTION__,
buf_pastend - buf, PIM_TLV_OPTION_SIZE(option_len));
return 0;
@@ -137,7 +137,7 @@
continue;
if ((curr + ucast_ipv4_encoding_len) > buf_pastend) {
- zlog_warn("%s: buffer overflow: left=%d needed=%d",
+ zlog_warn("%s: buffer overflow: left=%zd needed=%zu",
__PRETTY_FUNCTION__,
buf_pastend - curr, ucast_ipv4_encoding_len);
return 0;
@@ -155,7 +155,7 @@
}
if (PIM_DEBUG_PIM_TRACE) {
- zlog_warn("%s: number of encoded secondary unicast IPv4 addresses: %d",
+ zlog_warn("%s: number of encoded secondary unicast IPv4 addresses: %zu",
__PRETTY_FUNCTION__,
option_len / ucast_ipv4_encoding_len);
}
@@ -398,7 +398,7 @@
if ((addr + sizeof(struct in_addr)) > pastend) {
char src_str[100];
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
- zlog_warn("%s: IPv4 unicast address overflow: left=%d needed=%d from %s on %s",
+ zlog_warn("%s: IPv4 unicast address overflow: left=%zd needed=%zu from %s on %s",
__PRETTY_FUNCTION__,
pastend - addr, sizeof(struct in_addr),
src_str, ifname);
@@ -471,7 +471,7 @@
if ((addr + sizeof(struct in_addr)) > pastend) {
char src_str[100];
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
- zlog_warn("%s: IPv4 group address overflow: left=%d needed=%d from %s on %s",
+ zlog_warn("%s: IPv4 group address overflow: left=%zd needed=%zu from %s on %s",
__PRETTY_FUNCTION__,
pastend - addr, sizeof(struct in_addr),
src_str, ifname);
@@ -549,7 +549,7 @@
if ((addr + sizeof(struct in_addr)) > pastend) {
char src_str[100];
pim_inet4_dump("<src?>", src_addr, src_str, sizeof(src_str));
- zlog_warn("%s: IPv4 source address overflow: left=%d needed=%d from %s on %s",
+ zlog_warn("%s: IPv4 source address overflow: left=%zd needed=%zu from %s on %s",
__PRETTY_FUNCTION__,
pastend - addr, sizeof(struct in_addr),
src_str, ifname);