summaryrefslogtreecommitdiffstats
path: root/pw
diff options
context:
space:
mode:
authorBen Smithurst <ben@FreeBSD.org>2000-12-29 18:04:54 +0000
committerBen Smithurst <ben@FreeBSD.org>2000-12-29 18:04:54 +0000
commitd7e63c5f28d5aa9ff4b004a19b2089ff378a741d (patch)
tree3b6cd6337fc83dc1c561b4f9e6c9bec95cd6ad76 /pw
parent5eddc03002271e86488a08ccfbbfb81b2bb6071a (diff)
downloadpw-darwin-d7e63c5f28d5aa9ff4b004a19b2089ff378a741d.tar.gz
pw-darwin-d7e63c5f28d5aa9ff4b004a19b2089ff378a741d.tar.zst
pw-darwin-d7e63c5f28d5aa9ff4b004a19b2089ff378a741d.zip
Convert to use the <sys/queue.h> macros rather than fiddling with the queue
structure internals. Reviewed by: markm
Diffstat (limited to 'pw')
-rw-r--r--pw/pw.c4
-rw-r--r--pw/pw_user.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/pw/pw.c b/pw/pw.c
index ca3a10a..dd23df9 100644
--- a/pw/pw.c
+++ b/pw/pw.c
@@ -420,10 +420,10 @@ cmdhelp(int mode, int which)
struct carg *
getarg(struct cargs * _args, int ch)
{
- struct carg *c = _args->lh_first;
+ struct carg *c = LIST_FIRST(_args);
while (c != NULL && c->ch != ch)
- c = c->list.le_next;
+ c = LIST_NEXT(c, list);
return c;
}
diff --git a/pw/pw_user.c b/pw/pw_user.c
index c4e66b4..26615b7 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -891,9 +891,9 @@ pw_gidpolicy(struct userconf * cnf, struct cargs * args, char *nam, gid_t prefer
if ((grp = GETGRNAM(nam)) != NULL)
gid = grp->gr_gid;
}
- a_gid = grpargs.lh_first;
+ a_gid = LIST_FIRST(&grpargs);
while (a_gid != NULL) {
- struct carg *t = a_gid->list.le_next;
+ struct carg *t = LIST_NEXT(a_gid, list);
LIST_REMOVE(a_gid, list);
a_gid = t;
}