If no more module is found don't try to call setXXent functions but
authordrepper <drepper>
Sun, 15 Feb 1998 18:17:16 +0000 (18:17 +0000)
committerdrepper <drepper>
Sun, 15 Feb 1998 18:17:16 +0000 (18:17 +0000)
leave unsuccessfully.

nss/getXXent_r.c

index aa21b6f..b709a4a 100644 (file)
@@ -279,7 +279,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);
     }