about summary refs log tree commit diff
path: root/sysdeps/posix/getaddrinfo.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-12-29 23:47:07 +0000
committerUlrich Drepper <drepper@redhat.com>2008-12-29 23:47:07 +0000
commitbfbbc63f04a597d8ae35687a6cdae07f02bcf5dc (patch)
treea4212d337e6b77f4aa0bdb1ee7cd67d3a1e56168 /sysdeps/posix/getaddrinfo.c
parent5703f4727380ca751da51a94664689b5e97dc89f (diff)
downloadglibc-bfbbc63f04a597d8ae35687a6cdae07f02bcf5dc.tar.gz
glibc-bfbbc63f04a597d8ae35687a6cdae07f02bcf5dc.tar.xz
glibc-bfbbc63f04a597d8ae35687a6cdae07f02bcf5dc.zip
* sysdeps/posix/getaddrinfo.c (gaih_inet): When the
	gethostbyname4_r function call succeeded, just leave the loop.
Diffstat (limited to 'sysdeps/posix/getaddrinfo.c')
-rw-r--r--sysdeps/posix/getaddrinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 6ff0fc47a1..d346c621fb 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -714,6 +714,8 @@ gaih_inet (const char *name, const struct gaih_service *service,
 		      status = DL_CALL_FCT (fct4, (name, pat, tmpbuf,
 						   tmpbuflen, &rc, &herrno,
 						   NULL));
+		      if (status == NSS_STATUS_SUCCESS)
+			break;
 		      if (status != NSS_STATUS_TRYAGAIN
 			  || rc != ERANGE || herrno != NETDB_INTERNAL)
 			{