summary refs log tree commit diff
path: root/nss/getXXbyYY.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/getXXbyYY.c')
-rw-r--r--nss/getXXbyYY.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/nss/getXXbyYY.c b/nss/getXXbyYY.c
index 15cdcba3ff..7a52e9d3ba 100644
--- a/nss/getXXbyYY.c
+++ b/nss/getXXbyYY.c
@@ -114,12 +114,13 @@ FUNCTION_NAME (ADD_PARAMS)
     }
 
   while (buffer != NULL
-	 && INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, &resbuf, buffer,
-				       buffer_size, &result H_ERRNO_VAR) != 0
+	 && (INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, &resbuf, buffer,
+					buffer_size, &result H_ERRNO_VAR)
+	     == ERANGE)
 #ifdef NEED_H_ERRNO
 	 && h_errno_tmp == NETDB_INTERNAL
 #endif
-	 && errno == ERANGE)
+	 )
     {
       char *new_buf;
       buffer_size += BUFLEN;