diff options
author | DJ Delorie <dj@redhat.com> | 2020-11-09 22:09:34 -0500 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2020-12-04 17:16:32 -0500 |
commit | f4f3b09111e9fa38fd485979a3e40b6cfa6a757d (patch) | |
tree | f2743a776f31b86ebebc9f145dd1305bade66eef /nscd/aicache.c | |
parent | 6eceded941bb6dcc097291757e2aef5cd7212133 (diff) | |
download | glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.zip glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.tar.gz glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.tar.bz2 |
nsswitch: use new internal API (callers)
Stitch new ABI and types throughout all NSS callers.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'nscd/aicache.c')
-rw-r--r-- | nscd/aicache.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c index ee9c9b8..a15ea75 100644 --- a/nscd/aicache.c +++ b/nscd/aicache.c @@ -71,20 +71,15 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req, dbg_log (_("Reloading \"%s\" in hosts cache!"), (char *) key); } - static service_user *hosts_database; - service_user *nip; + nss_action_list nip; int no_more; int rc6 = 0; int rc4 = 0; int herrno = 0; - if (hosts_database == NULL) - no_more = __nss_database_lookup2 ("hosts", NULL, - "dns [!UNAVAIL=return] files", - &hosts_database); - else - no_more = 0; - nip = hosts_database; + no_more = __nss_database_lookup2 ("hosts", NULL, + "dns [!UNAVAIL=return] files", + &nip); /* Initialize configurations. */ struct resolv_context *ctx = __resolv_context_get (); @@ -442,10 +437,10 @@ next_nip: if (nss_next_action (nip, status[1]) == NSS_ACTION_RETURN) break; - if (nip->next == NULL) + if (nip[1].module == NULL) no_more = -1; else - nip = nip->next; + ++nip; } /* No result found. Create a negative result record. */ |