diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-06-12 22:31:43 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-06-12 22:31:43 +0000 |
commit | 2ce1a10fd6a59d6767e0064296e6c0adfa43198a (patch) | |
tree | 980d361cbe359fbf1db5a3bfa003faf37c13571c /nss/getXXbyYY_r.c | |
parent | ad316adfa6d389f27f726e1e377a66e3cdd9748e (diff) | |
download | glibc-2ce1a10fd6a59d6767e0064296e6c0adfa43198a.zip glibc-2ce1a10fd6a59d6767e0064296e6c0adfa43198a.tar.gz glibc-2ce1a10fd6a59d6767e0064296e6c0adfa43198a.tar.bz2 |
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/getXXbyYY_r.c')
-rw-r--r-- | nss/getXXbyYY_r.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c index 632778d..3f873a5 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)); } |