Skip to content

Commit ef7838a

Browse files
committed
viewer: Fix format string
Variable port is an int, so "%d" is needed. Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent d11b7e0 commit ef7838a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

viewer/svutil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ static int GetAddrInfo(const char* hostname, int port,
372372
struct addrinfo** address) {
373373
#if defined(__linux__)
374374
char port_str[40];
375-
snprintf(port_str, 40, "%ld", port);
375+
snprintf(port_str, 40, "%d", port);
376376
return getaddrinfo(hostname, port_str, NULL, address);
377377
#else
378378
return GetAddrInfoNonLinux(hostname, port, address);

0 commit comments

Comments
 (0)