]> git.cameronkatri.com Git - pw-darwin.git/commitdiff
Convert to use the <sys/queue.h> macros rather than fiddling with the queue
authorBen Smithurst <ben@FreeBSD.org>
Fri, 29 Dec 2000 18:04:54 +0000 (18:04 +0000)
committerBen Smithurst <ben@FreeBSD.org>
Fri, 29 Dec 2000 18:04:54 +0000 (18:04 +0000)
structure internals.

Reviewed by: markm

pw/pw.c
pw/pw_user.c

diff --git a/pw/pw.c b/pw/pw.c
index ca3a10abaf0f1c9113f18f221f6f53aa190ba8b5..dd23df92e1c120ae63cd72a2d2ef5900a44f7326 100644 (file)
--- 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;
 }
 
index c4e66b4ec879c9de4b6889d88896316b8b461afb..26615b7f9ec9e63fd3ea4ab5a980e67996396c2e 100644 (file)
@@ -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;
                }