Fix logic in gethostbyname_r (bug #1634)
authorMark Spencer <markster@digium.com>
Sat, 15 May 2004 05:02:42 +0000 (05:02 +0000)
committerMark Spencer <markster@digium.com>
Sat, 15 May 2004 05:02:42 +0000 (05:02 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2966 65c4cc65-6c06-0410-ace0-fbb531ad65f3

utils.c

diff --git a/utils.c b/utils.c
index ebe2b37..49fdf5d 100755 (executable)
--- a/utils.c
+++ b/utils.c
@@ -111,7 +111,7 @@ int gethostbyname_r (const char *name, struct hostent *ret, char *buf,
        h_errno = hsave;  /* restore h_errno */
        ast_mutex_unlock(&__mutex); /* end critical area */
 
-       return (*result != NULL);
+       return (*result == NULL); /* return 0 on success, non-zero on error */
 }