From fa0069c647d738463b35aac61b2427f66b8e083c Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 3 Apr 2019 16:39:50 -0400 Subject: 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 --- zebra/kernel_socket.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'zebra/kernel_socket.c') 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; -- cgit v1.2.3