From 00ccd3bd3f9b82ae8fc167a0b61617aa0d231440 Mon Sep 17 00:00:00 2001 From: "lsalzman@gmail.com" Date: Fri, 19 Feb 2016 19:54:40 -0500 Subject: [PATCH] return -1 instead of 0 if getnameinfo returns an error --- unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix.c b/unix.c index 90e55b1..b3cadd0 100644 --- a/unix.c +++ b/unix.c @@ -204,7 +204,7 @@ enet_address_get_host (const ENetAddress * address, char * name, size_t nameLeng return 0; } if (err != EAI_NONAME) - return 0; + return -1; #else struct in_addr in; struct hostent * hostEntry = NULL;