From bfbbc63f04a597d8ae35687a6cdae07f02bcf5dc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 29 Dec 2008 23:47:07 +0000 Subject: * sysdeps/posix/getaddrinfo.c (gaih_inet): When the gethostbyname4_r function call succeeded, just leave the loop. --- sysdeps/posix/getaddrinfo.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sysdeps') 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) { -- cgit v1.2.3