about summary refs log tree commit diff
path: root/nss/getnssent_r.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 /nss/getnssent_r.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 'nss/getnssent_r.c')
-rw-r--r--nss/getnssent_r.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/nss/getnssent_r.c b/nss/getnssent_r.c
index 8a366bc7ea..84e977c33b 100644
--- a/nss/getnssent_r.c
+++ b/nss/getnssent_r.c
@@ -25,20 +25,20 @@
    services (left).  */
 static int
 setup (const char *func_name, db_lookup_function lookup_fct,
-       void **fctp, service_user **nip, service_user **startp, int all)
+       void **fctp, nss_action_list *nip, nss_action_list *startp, int all)
 {
   int no_more;
-  if (*startp == NULL)
+  if (*startp == NULL || all)
     {
       no_more = lookup_fct (nip, func_name, NULL, fctp);
-      *startp = no_more ? (service_user *) -1l : *nip;
+      *startp = no_more ? (nss_action_list) -1l : *nip;
     }
-  else if (*startp == (service_user *) -1l)
+  else if (*startp == (nss_action_list) -1l)
     /* No services at all.  */
     return 1;
   else
     {
-      if (all || !*nip)
+      if (!*nip)
 	/* Reset to the beginning of the service list.  */
 	*nip = *startp;
       /* Look up the first function.  */
@@ -49,8 +49,8 @@ setup (const char *func_name, db_lookup_function lookup_fct,
 
 void
 __nss_setent (const char *func_name, db_lookup_function lookup_fct,
-	      service_user **nip, service_user **startp,
-	      service_user **last_nip, int stayopen, int *stayopen_tmp,
+	      nss_action_list *nip, nss_action_list *startp,
+	      nss_action_list *last_nip, int stayopen, int *stayopen_tmp,
 	      int res)
 {
   union
@@ -110,8 +110,8 @@ __nss_setent (const char *func_name, db_lookup_function lookup_fct,
 
 void
 __nss_endent (const char *func_name, db_lookup_function lookup_fct,
-	      service_user **nip, service_user **startp,
-	      service_user **last_nip, int res)
+	      nss_action_list *nip, nss_action_list *startp,
+	      nss_action_list *last_nip, int res)
 {
   union
   {
@@ -154,8 +154,8 @@ int
 __nss_getent_r (const char *getent_func_name,
 		const char *setent_func_name,
 		db_lookup_function lookup_fct,
-		service_user **nip, service_user **startp,
-		service_user **last_nip, int *stayopen_tmp, int res,
+		nss_action_list *nip, nss_action_list *startp,
+		nss_action_list *last_nip, int *stayopen_tmp, int res,
 		void *resbuf, char *buffer, size_t buflen,
 		void **result, int *h_errnop)
 {