summaryrefslogtreecommitdiff
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-04-03 16:39:50 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-04-03 16:39:50 -0400
commitfa0069c647d738463b35aac61b2427f66b8e083c (patch)
tree573c20969fcc1edf46bff9a59ffa34cd951f6451 /zebra/kernel_socket.c
parentfb09579ef78f9bc2588658b5ca5c3d17f098477e (diff)
lib, pbrd, zebra: Fix size_t type printf warnings on obscure platforms
Use the correct printf formater for those obscure platforms that we build against. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/kernel_socket.c')
-rw-r--r--zebra/kernel_socket.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 1bbb98ad19..13d2185b0f 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -280,8 +280,9 @@ size_t _rta_get(caddr_t sap, void *destp, size_t destlen, bool checkaf)
}
if (copylen > destlen) {
- zlog_warn("%s: destination buffer too small (%lu vs %lu)",
- __func__, copylen, destlen);
+ zlog_warn(
+ "%s: destination buffer too small (%zu vs %zu)",
+ __func__, copylen, destlen);
memcpy(dest, sap, destlen);
} else
memcpy(dest, sap, copylen);
@@ -316,8 +317,9 @@ size_t rta_getsdlname(caddr_t sap, void *destp, short *destlen)
if (copylen > 0 && dest != NULL && sdl->sdl_family == AF_LINK) {
if (copylen > IFNAMSIZ) {
- zlog_warn("%s: destination buffer too small (%lu vs %d)",
- __func__, copylen, IFNAMSIZ);
+ zlog_warn(
+ "%s: destination buffer too small (%zu vs %d)",
+ __func__, copylen, IFNAMSIZ);
memcpy(dest, sdl->sdl_data, IFNAMSIZ);
dest[IFNAMSIZ] = 0;
*destlen = IFNAMSIZ;