From: Andre Noll Date: Thu, 1 Jan 2015 18:02:04 +0000 (+0000) Subject: net.c: Fix format string in stringify_port(). X-Git-Tag: v0.5.4~40 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=c560bc7384fce57898044c77274e9701bc47acec 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. --- 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); }