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 --- inet/ether_ntoh.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'inet/ether_ntoh.c') diff --git a/inet/ether_ntoh.c b/inet/ether_ntoh.c index e409773..5ef6542 100644 --- a/inet/ether_ntoh.c +++ b/inet/ether_ntoh.c @@ -31,9 +31,7 @@ typedef int (*lookup_function) (const struct ether_addr *, struct etherent *, int ether_ntohost (char *hostname, const struct ether_addr *addr) { - static service_user *startp; - static lookup_function start_fct; - service_user *nip; + nss_action_list nip; union { lookup_function f; @@ -43,22 +41,7 @@ ether_ntohost (char *hostname, const struct ether_addr *addr) enum nss_status status = NSS_STATUS_UNAVAIL; struct etherent etherent; - if (startp == NULL) - { - no_more = __nss_ethers_lookup2 (&nip, "getntohost_r", NULL, &fct.ptr); - if (no_more) - startp = (service_user *) -1; - else - { - startp = nip; - start_fct = fct.f; - } - } - else - { - fct.f = start_fct; - no_more = (nip = startp) == (service_user *) -1; - } + no_more = __nss_ethers_lookup2 (&nip, "getntohost_r", NULL, &fct.ptr); while (no_more == 0) { -- cgit v1.1