about summary refs log tree commit diff
path: root/inet/ether_hton.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2020-11-09 22:09:34 -0500
committerDJ Delorie <dj@redhat.com>2020-12-04 17:16:32 -0500
commitf4f3b09111e9fa38fd485979a3e40b6cfa6a757d (patch)
treef2743a776f31b86ebebc9f145dd1305bade66eef /inet/ether_hton.c
parent6eceded941bb6dcc097291757e2aef5cd7212133 (diff)
downloadglibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.tar.gz
glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.tar.xz
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_hton.c')
-rw-r--r--inet/ether_hton.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/inet/ether_hton.c b/inet/ether_hton.c
index ff6943fc35..cccae17f10 100644
--- a/inet/ether_hton.c
+++ b/inet/ether_hton.c
@@ -30,9 +30,7 @@ typedef int (*lookup_function) (const char *, struct etherent *, char *, int,
 int
 ether_hostton (const char *hostname, struct ether_addr *addr)
 {
-  static service_user *startp;
-  static lookup_function start_fct;
-  service_user *nip;
+  nss_action_list nip;
   union
   {
     lookup_function f;
@@ -42,22 +40,7 @@ ether_hostton (const char *hostname, struct ether_addr *addr)
   enum nss_status status = NSS_STATUS_UNAVAIL;
   struct etherent etherent;
 
-  if (startp == NULL)
-    {
-      no_more = __nss_ethers_lookup2 (&nip, "gethostton_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, "gethostton_r", NULL, &fct.ptr);
 
   while (no_more == 0)
     {