2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

simplify iterator

This commit is contained in:
Todd C. Miller
2018-02-10 04:29:43 -07:00
parent 6e2a267060
commit 34820c6b15
4 changed files with 10 additions and 15 deletions

View File

@@ -2312,12 +2312,11 @@ sudo_ldap_display_bound_defaults(struct sudo_nss *nss, struct passwd *pw,
}
static char *
berval_iter(void *base, void **save)
berval_iter(void **vp)
{
struct berval **bv;
struct berval **bv = *vp;
bv = *save ? *save : base;
*save = bv + 1;
*vp = bv + 1;
return *bv ? (*bv)->bv_val : NULL;
}