From f4f3b09111e9fa38fd485979a3e40b6cfa6a757d Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 9 Nov 2020 22:09:34 -0500 Subject: nsswitch: use new internal API (callers) Stitch new ABI and types throughout all NSS callers. Reviewed-by: Siddhesh Poyarekar --- nscd/aicache.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'nscd/aicache.c') diff --git a/nscd/aicache.c b/nscd/aicache.c index ee9c9b8843..a15ea751a7 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. */ -- cgit 1.4.1