From 1670698f4a3802bcd26f94e24419f17fa1248861 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 Jun 1999 12:33:08 +0000 Subject: Update. * nss/getXXbyYY_r.c: Return error code not -1. * nss/getXXent_r.c: Likewise. * nss/getXXbyYY.c: Expect return alue to be ERANGE if buffer is too small. * nscd/nscd_getgr_r.c: Return -1 in case nscd is not available and value > 0 for error. * nscd/nscd_gethst_r.c: Likewise. * nscd/nscd_getpw_r.c: Likewise. 1999-06-17 Andreas Jaeger * sysdeps/unix/sysv/linux/bits/ioctl-types.h: Add missing line disciplines. 1999-06-14 Andreas Jaeger * nscd/nscd_nischeck.c: Fix typos. 1999-06-17 Ulrich Drepper --- nss/getXXbyYY_r.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nss/getXXbyYY_r.c') diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c index 7b10304a32..8ad4754a3b 100644 --- a/nss/getXXbyYY_r.c +++ b/nss/getXXbyYY_r.c @@ -122,7 +122,7 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer, { *h_errnop = NETDB_INTERNAL; *result = NULL; - return -1; + return errno; } # define resbuf (*resbuf) # include "digits_dots.c" @@ -137,7 +137,7 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer, { nscd_status = NSCD_NAME (ADD_VARIABLES, resbuf, buffer, buflen H_ERRNO_VAR); - if (nscd_status < 1) + if (nscd_status >= 0) { *result = nscd_status == 0 ? resbuf : NULL; return nscd_status; @@ -162,7 +162,7 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer, { *h_errnop = NETDB_INTERNAL; *result = NULL; - return -1; + return errno; } #endif /* need _res */ #ifdef NEED__RES_HCONF @@ -205,7 +205,7 @@ done: #ifdef POSTPROCESS POSTPROCESS; #endif - return status == NSS_STATUS_SUCCESS ? 0 : -1; + return status == NSS_STATUS_SUCCESS ? 0 : errno; } #define do_weak_alias(n1, n2) weak_alias (n1, (n2)) -- cgit v1.2.1