about summary refs log tree commit diff
path: root/sysdeps/posix/getaddrinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/getaddrinfo.c')
-rw-r--r--sysdeps/posix/getaddrinfo.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index cbcb109294..7f3c8aba59 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -238,8 +238,7 @@ gaih_inet_serv (const char *servicename, struct gaih_typeproto *tp,
       return -EAI_MEMORY;					\
     rc = __gethostbyname2_r (name, _family, &th, tmpbuf,	\
          tmpbuflen, &h, &herrno);				\
-  } while ((rc != 0) &&						\
-    (herrno == NETDB_INTERNAL) && (errno == ERANGE));		\
+  } while (rc == ERANGE && herrno == NETDB_INTERNAL);		\
   if ((rc != 0) && (herrno == NETDB_INTERNAL))			\
     {								\
       __set_h_errno (herrno);					\