diff options
author | ben <ben@FreeBSD.org> | 2000-12-29 18:04:54 +0000 |
---|---|---|
committer | ben <ben@FreeBSD.org> | 2000-12-29 18:04:54 +0000 |
commit | aa1051802050e4b3f8e101d6829c1b31e1e67226 (patch) | |
tree | 9e119180eea063f2ade5bbb129acceefc2a4f2bb /usr.sbin/tzsetup/tzsetup.c | |
parent | 829d1eb6e8edc31d7a31355b8caa9ce50fa31471 (diff) | |
download | FreeBSD-src-aa1051802050e4b3f8e101d6829c1b31e1e67226.zip FreeBSD-src-aa1051802050e4b3f8e101d6829c1b31e1e67226.tar.gz |
Convert to use the <sys/queue.h> macros rather than fiddling with the queue
structure internals.
Reviewed by: markm
Diffstat (limited to 'usr.sbin/tzsetup/tzsetup.c')
-rw-r--r-- | usr.sbin/tzsetup/tzsetup.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 5a12261..ee5672e 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -378,12 +378,11 @@ make_menus(void) if (cp->nzones < 0) { cp->continent->nitems++; } else { - for (zp = cp->zones.tqh_first; zp; - zp = zp->link.tqe_next) { + TAILQ_FOREACH(zp, &cp->zones, link) { cont = zp->continent; - for (zp2 = cp->zones.tqh_first; + for (zp2 = TAILQ_FIRST(&cp->zones); zp2->continent != cont; - zp2 = zp2->link.tqe_next) + zp2 = TAILQ_NEXT(zp2, link)) ; if (zp2 == zp) zp->continent->nitems++; @@ -428,8 +427,7 @@ make_menus(void) if (cp->submenu == 0) errx(1, "malloc for submenu"); cp->nzones = 0; - for (zp = cp->zones.tqh_first; zp; - zp = zp->link.tqe_next) { + TAILQ_FOREACH(zp, &cp->zones, link) { cont = zp->continent; dmi = &cp->submenu[cp->nzones]; memset(dmi, 0, sizeof *dmi); @@ -441,9 +439,9 @@ make_menus(void) dmi->selected = 0; dmi->data = zp; - for (zp2 = cp->zones.tqh_first; + for (zp2 = TAILQ_FIRST(&cp->zones); zp2->continent != cont; - zp2 = zp2->link.tqe_next) + zp2 = TAILQ_NEXT(zp2, link)) ; if (zp2 != zp) continue; |