viewer: Fix format string

Variable port is an int, so "%d" is needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2015-11-04 09:41:22 +01:00
parent d11b7e0624
commit ef7838a950

View File

@ -372,7 +372,7 @@ static int GetAddrInfo(const char* hostname, int port,
struct addrinfo** address) {
#if defined(__linux__)
char port_str[40];
snprintf(port_str, 40, "%ld", port);
snprintf(port_str, 40, "%d", port);
return getaddrinfo(hostname, port_str, NULL, address);
#else
return GetAddrInfoNonLinux(hostname, port, address);