]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sun, 29 Mar 1998 22:56:22 +0000 (22:56 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 29 Mar 1998 22:56:22 +0000 (22:56 +0000)
* nss/getXXent_r.c: Correctly handle failing setXXent function.

ChangeLog
nss/getXXent_r.c

index 979d531ca7663ce8a788ae73780e4d3db9efd6d7..14b50084801cf6930b96831ca0a9e12956997806 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 1998-03-29  Ulrich Drepper  <drepper@cygnus.com>
 
+       * nss/getXXent_r.c: Correctly handle failing setXXent function.
+
        * inet/netinet/in.h: Use cast to uint32_t in IPv4 macros.
        Reported by Andreas Jaeger.
 
index b709a4a935aa22a73344160eb929850b937f3fdf..1d27cfc66a8ba1782557baca8fd95ce5143792ee 100644 (file)
@@ -261,32 +261,29 @@ INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen,
          && errno == ERANGE)
        break;
 
-      no_more = __nss_next (&nip, GETFUNC_NAME_STRING, (void **) &fct,
-                           status, 0);
+      do
+       {
+         no_more = __nss_next (&nip, GETFUNC_NAME_STRING, (void **) &fct,
+                               status, 0);
 
-      if (is_last_nip)
-       last_nip = nip;
+         if (is_last_nip)
+           last_nip = nip;
 
-      if (! no_more && current_nip != nip)
-       /* Call the `setXXent' function.  This wasn't done before.  */
-       do
-         {
-           set_function sfct;
+         if (! no_more)
+           {
+             /* Call the `setXXent' function.  This wasn't done before.  */
+             set_function sfct;
 
-           no_more = __nss_lookup (&nip, SETFUNC_NAME_STRING,
-                                   (void **) &sfct);
+             no_more = __nss_lookup (&nip, SETFUNC_NAME_STRING,
+                                     (void **) &sfct);
 
-           if (! no_more)
-             status = (*sfct) (STAYOPEN_TMPVAR);
-           else
-             {
+             if (! no_more)
+               status = (*sfct) (STAYOPEN_TMPVAR);
+             else
                status = NSS_STATUS_NOTFOUND;
-               if (no_more == 1)
-                 /* There is no more module to search.  */
-                 break;
-             }
-         }
-       while (! no_more && status != NSS_STATUS_SUCCESS);
+           }
+       }
+      while (! no_more && status != NSS_STATUS_SUCCESS);
     }
 
   __libc_lock_unlock (lock);