summaryrefslogtreecommitdiffstats
path: root/sbin/fsck/fsck.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-12-30 21:05:45 +0000
committerphk <phk@FreeBSD.org>2000-12-30 21:05:45 +0000
commit012b3e6f2040d83c0336346be7483454fa3924e0 (patch)
treedaac72cf76064b2b74b3bedf2cb122ce5c819912 /sbin/fsck/fsck.c
parent7fd96a9db33fa7d84ed0b1bc4e57a4d42268145a (diff)
downloadFreeBSD-src-012b3e6f2040d83c0336346be7483454fa3924e0.zip
FreeBSD-src-012b3e6f2040d83c0336346be7483454fa3924e0.tar.gz
Use macro API to <sys/queue.h>
Submitted by: "Peter Avalos" <pavalos@theshell.com> Reviewed by: /sbin/md5
Diffstat (limited to 'sbin/fsck/fsck.c')
-rw-r--r--sbin/fsck/fsck.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c
index 84fcdf1..2eb26a0 100644
--- a/sbin/fsck/fsck.c
+++ b/sbin/fsck/fsck.c
@@ -141,7 +141,7 @@ main(argc, argv)
break;
case 't':
- if (selhead.tqh_first != NULL)
+ if (!TAILQ_EMPTY(&selhead))
errx(1, "only one -t option may be specified.");
maketypelist(optarg);
@@ -350,7 +350,7 @@ selected(type)
struct entry *e;
/* If no type specified, it's always selected. */
- for (e = selhead.tqh_first; e != NULL; e = e->entries.tqe_next)
+ TAILQ_FOREACH(e, &selhead, entries)
if (!strncmp(e->type, type, MFSNAMELEN))
return which == IN_LIST ? 1 : 0;
@@ -364,7 +364,7 @@ getoptions(type)
{
struct entry *e;
- for (e = opthead.tqh_first; e != NULL; e = e->entries.tqe_next)
+ TAILQ_FOREACH(e, &opthead, entries)
if (!strncmp(e->type, type, MFSNAMELEN))
return e->options;
return "";
@@ -383,7 +383,7 @@ addoption(optstr)
*newoptions++ = '\0';
- for (e = opthead.tqh_first; e != NULL; e = e->entries.tqe_next)
+ TAILQ_FOREACH(e, &opthead, entries)
if (!strncmp(e->type, optstr, MFSNAMELEN)) {
catopt(&e->options, newoptions);
return;
OpenPOWER on IntegriCloud