about summary refs log tree commit diff
path: root/nss
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-06-12 22:31:43 +0000
committerUlrich Drepper <drepper@redhat.com>2003-06-12 22:31:43 +0000
commit2ce1a10fd6a59d6767e0064296e6c0adfa43198a (patch)
tree980d361cbe359fbf1db5a3bfa003faf37c13571c /nss
parentad316adfa6d389f27f726e1e377a66e3cdd9748e (diff)
downloadglibc-2ce1a10fd6a59d6767e0064296e6c0adfa43198a.tar.gz
glibc-2ce1a10fd6a59d6767e0064296e6c0adfa43198a.tar.xz
glibc-2ce1a10fd6a59d6767e0064296e6c0adfa43198a.zip
Update.
	* sysdeps/posix/getaddrinfo.c (gaih_inet): Set no_inet6_date alse
	if only PF_INET address is needed.

	* nss/getXXbyYY_r.c: Make sure we always return a nonzero value in
	case of an error.
Diffstat (limited to 'nss')
-rw-r--r--nss/getXXbyYY_r.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 632778d9aa..3f873a5fde 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -247,12 +247,14 @@ done:
 #ifdef POSTPROCESS
   POSTPROCESS;
 #endif
-  return (status != NSS_STATUS_TRYAGAIN ? 0
+  return (status == NSS_STATUS_SUCCESS ? 0
+	  : (status != NSS_STATUS_TRYAGAIN
 #ifdef NEED_H_ERRNO
-	  /* These functions only set errno if h_errno is NETDB_INTERNAL.  */
-	  : *h_errnop != NETDB_INTERNAL ? EAGAIN
+	     /* These functions only set errno if h_errno is
+		NETDB_INTERNAL.  */
+	     && *h_errnop == NETDB_INTERNAL
 #endif
-	  : errno);
+	     ? errno : EAGAIN));
 }