aboutsummaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-18 04:03:36 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-18 04:03:36 +0000
commit2cfe49db2535beb7ef865462c8655b6af9bc20bd (patch)
tree7bd0f968ede70a7310ed62e5861787458f535b59 /nss
parent46d7e2ba2235768df3d633109451fd2bee5f9291 (diff)
downloadglibc-2cfe49db2535beb7ef865462c8655b6af9bc20bd.zip
glibc-2cfe49db2535beb7ef865462c8655b6af9bc20bd.tar.gz
glibc-2cfe49db2535beb7ef865462c8655b6af9bc20bd.tar.bz2
Update.
* nss/getXXbyYY_r.c (REENTRANT_NAME): Return 0 is no entry has been found.
Diffstat (limited to 'nss')
-rw-r--r--nss/getXXbyYY_r.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 5bb28f7..ba6ffeb 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -247,8 +247,7 @@ done:
#ifdef POSTPROCESS
POSTPROCESS;
#endif
- return (status == NSS_STATUS_SUCCESS ? 0
- : status != NSS_STATUS_TRYAGAIN ? ENOENT
+ return (status != NSS_STATUS_TRYAGAIN ? 0
#ifdef NEED_H_ERRNO
/* These functions only set errno if h_errno is NETDB_INTERNAL. */
: *h_errnop != NETDB_INTERNAL ? EAGAIN
@@ -269,7 +268,7 @@ OLD (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
int ret = INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, resbuf, buffer,
buflen, result H_ERRNO_VAR);
- if (ret != 0)
+ if (ret != 0 || result == NULL)
ret = -1;
return ret;