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_igmp.c b/pimd/pim_igmp.c
index a0a4aa8..dcb9a9b 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -679,7 +679,7 @@
char to_str[100];
if (len < sizeof(*ip_hdr)) {
- zlog_warn("IGMP packet size=%d shorter than minimum=%d",
+ zlog_warn("IGMP packet size=%zu shorter than minimum=%zu",
len, sizeof(*ip_hdr));
return -1;
}
@@ -692,7 +692,7 @@
ip_hlen = ip_hdr->ip_hl << 2; /* ip_hl gives length in 4-byte words */
if (PIM_DEBUG_IGMP_PACKETS) {
- zlog_debug("Recv IP packet from %s to %s on %s: size=%d ip_header_size=%d ip_proto=%d",
+ zlog_debug("Recv IP packet from %s to %s on %s: size=%zu ip_header_size=%zu ip_proto=%d",
from_str, to_str, igmp->interface->name, len, ip_hlen, ip_hdr->ip_p);
}
@@ -703,12 +703,12 @@
}
if (ip_hlen < PIM_IP_HEADER_MIN_LEN) {
- zlog_warn("IP packet header size=%d shorter than minimum=%d",
+ zlog_warn("IP packet header size=%zu shorter than minimum=%d",
ip_hlen, PIM_IP_HEADER_MIN_LEN);
return -1;
}
if (ip_hlen > PIM_IP_HEADER_MAX_LEN) {
- zlog_warn("IP packet header size=%d greater than maximum=%d",
+ zlog_warn("IP packet header size=%zu greater than maximum=%d",
ip_hlen, PIM_IP_HEADER_MAX_LEN);
return -1;
}