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 /inet/ether_ntoh.c | |
parent | 6eceded941bb6dcc097291757e2aef5cd7212133 (diff) | |
download | glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.tar glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.tar.gz glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.tar.bz2 glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.zip |
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 'inet/ether_ntoh.c')
-rw-r--r-- | inet/ether_ntoh.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/inet/ether_ntoh.c b/inet/ether_ntoh.c index e409773601..5ef654292c 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) { |