]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(__nss_lookup): Return 1 if this was the last module.
authorUlrich Drepper <drepper@redhat.com>
Wed, 4 Mar 1998 11:30:00 +0000 (11:30 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 4 Mar 1998 11:30:00 +0000 (11:30 +0000)
nss/nsswitch.c

index ac7cc877e6ed2525945a8fb66f0cfd0c83b7ea95..f06a34bd5bc435953b16779982f43992c6399c0c 100644 (file)
@@ -107,7 +107,7 @@ __nss_database_lookup (const char *database, const char *alternate_name,
          *ni = entry->service;
 
       if (*ni == NULL && alternate_name != NULL)
-       /* We haven't found a an entry so far.  Try to find it with
+       /* We haven't found an entry so far.  Try to find it with
           the alternative name.  */
        for (entry = service_table->entry; entry != NULL; entry = entry->next)
          if (strcmp (alternate_name, entry->name) == 0)
@@ -130,7 +130,8 @@ __nss_database_lookup (const char *database, const char *alternate_name,
 
 
 /* -1 == not found
-    0 == adjusted for next function */
+    0 == adjusted for next function
+    1 == finished */
 int
 __nss_lookup (service_user **ni, const char *fct_name, void **fctp)
 {
@@ -145,7 +146,7 @@ __nss_lookup (service_user **ni, const char *fct_name, void **fctp)
       *fctp = nss_lookup_function (*ni, fct_name);
     }
 
-  return *fctp != NULL ? 0 : -1;
+  return *fctp != NULL ? 0 : (*ni)->next == NULL ? 1 : -1;
 }