diff options
author | plutooo <tfy12vbr@student.lu.se> | 2013-08-01 11:52:13 -0700 |
---|---|---|
committer | plutooo <tfy12vbr@student.lu.se> | 2013-08-01 11:54:06 -0700 |
commit | 3d916b35f2dadd17a7c9f5acd08ef396b8c8263c (patch) | |
tree | cf0fcbc0a51c0c02e4949e3cd4e8822b41bf5af8 /testing/nTox_win32.c | |
parent | d534a052648cc0085d6d6e40c22701e2feb5b416 (diff) |
core: getaddrinfo() lookup error handling
Diffstat (limited to 'testing/nTox_win32.c')
-rw-r--r-- | testing/nTox_win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/nTox_win32.c b/testing/nTox_win32.c index b9208d4f..2394877f 100644 --- a/testing/nTox_win32.c +++ b/testing/nTox_win32.c | |||
@@ -346,7 +346,7 @@ int main(int argc, char *argv[]) | |||
346 | IP_Port bootstrap_ip_port; | 346 | IP_Port bootstrap_ip_port; |
347 | bootstrap_ip_port.port = htons(atoi(argv[2])); | 347 | bootstrap_ip_port.port = htons(atoi(argv[2])); |
348 | int resolved_address = resolve_addr(argv[1]); | 348 | int resolved_address = resolve_addr(argv[1]); |
349 | if (resolved_address != -1) | 349 | if (resolved_address != 0) |
350 | bootstrap_ip_port.ip.i = resolved_address; | 350 | bootstrap_ip_port.ip.i = resolved_address; |
351 | else | 351 | else |
352 | exit(1); | 352 | exit(1); |
@@ -384,4 +384,4 @@ int main(int argc, char *argv[]) | |||
384 | Sleep(1); | 384 | Sleep(1); |
385 | } | 385 | } |
386 | return 0; | 386 | return 0; |
387 | } \ No newline at end of file | 387 | } |