From c560bc7384fce57898044c77274e9701bc47acec Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 1 Jan 2015 18:02:04 +0000 Subject: [PATCH 1/1] net.c: Fix format string in stringify_port(). "port" is int, rather than unsigned. No biggy since at this point we already know that port > 0. Found by cppcheck. --- net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net.c b/net.c index dcadf543..aa3fcbb9 100644 --- a/net.c +++ b/net.c @@ -208,7 +208,7 @@ const char *stringify_port(int port, const char *transport) struct servent *se = getservbyport(htons(port), transport); if (se == NULL) - snprintf(service, sizeof(service), "%u", port); + snprintf(service, sizeof(service), "%d", port); else snprintf(service, sizeof(service), "%s", se->s_name); } -- 2.30.2