소스 검색

return -1 instead of 0 if getnameinfo returns an error

lsalzman@gmail.com 9 년 전
부모
커밋
00ccd3bd3f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      unix.c

+ 1 - 1
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;