Skip to content

Commit

Permalink
viewer: Fix format string
Browse files Browse the repository at this point in the history
Variable port is an int, so "%d" is needed.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Nov 4, 2015
1 parent d11b7e0 commit ef7838a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion viewer/svutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ef7838a

Please sign in to comment.