From: Ulrich Drepper Date: Wed, 4 Mar 1998 11:29:45 +0000 (+0000) Subject: If no more module is found don't try to call setXXent functions but X-Git-Tag: cvs/before-sparc-2_0_x-branch~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c0c1d747257fbf3389fd9d2aa6479bd65414563;p=thirdparty%2Fglibc.git If no more module is found don't try to call setXXent functions but leave unsuccessfully. --- diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c index 60f1009270a..91be88739dc 100644 --- a/nss/getXXent_r.c +++ b/nss/getXXent_r.c @@ -276,7 +276,12 @@ INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen, if (! no_more) status = (*sfct) (STAYOPEN_TMPVAR); else - status = NSS_STATUS_NOTFOUND; + { + status = NSS_STATUS_NOTFOUND; + if (no_more == 1) + /* There is no more module to search. */ + break; + } } while (! no_more && status != NSS_STATUS_SUCCESS); }