summaryrefslogtreecommitdiff
path: root/sbin/fsck/preen.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2005-10-28 07:30:36 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2005-10-28 07:30:36 +0000
commitdc5a52b8f13af8e77898153dd0286063cbc170e7 (patch)
tree583c0124fdc4fff026238c7589e0974b22b595b3 /sbin/fsck/preen.c
parent97159e2117ae33feb8fc7ee89990516e081faadc (diff)
Change some TAILQ_FIRST() == NULL tests into TAILQ_EMPTY(). The first
form is valid, but in these cases its more clear to say what you mean. ok pat@ henning@
Diffstat (limited to 'sbin/fsck/preen.c')
-rw-r--r--sbin/fsck/preen.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sbin/fsck/preen.c b/sbin/fsck/preen.c
index e0b6c2f99a2..4c87b4c5684 100644
--- a/sbin/fsck/preen.c
+++ b/sbin/fsck/preen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: preen.c,v 1.15 2005/10/15 06:26:28 otto Exp $ */
+/* $OpenBSD: preen.c,v 1.16 2005/10/28 07:30:35 otto Exp $ */
/* $NetBSD: preen.c,v 1.15 1996/09/28 19:21:42 christos Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)preen.c 8.3 (Berkeley) 12/6/94";
#else
-static const char rcsid[] = "$OpenBSD: preen.c,v 1.15 2005/10/15 06:26:28 otto Exp $";
+static const char rcsid[] = "$OpenBSD: preen.c,v 1.16 2005/10/28 07:30:35 otto Exp $";
#endif
#endif /* not lint */
@@ -197,11 +197,11 @@ checkfstab(int flags, int maxrun, void *(*docheck)(struct fstab *),
d->d_pid = 0;
nrun--;
- if (TAILQ_FIRST(&d->d_part) == NULL)
+ if (TAILQ_EMPTY(&d->d_part))
ndisks--;
if (nextdisk == NULL) {
- if (TAILQ_FIRST(&d->d_part)) {
+ if (!TAILQ_EMPTY(&d->d_part)) {
if ((ret = startdisk(d, checkit)) != 0)
return ret;
}
@@ -211,8 +211,8 @@ checkfstab(int flags, int maxrun, void *(*docheck)(struct fstab *),
d_entries);
if (nextdisk == NULL)
nextdisk = TAILQ_FIRST(&diskh);
- if (TAILQ_FIRST(&nextdisk->d_part) !=
- NULL && nextdisk->d_pid == 0)
+ if (!TAILQ_EMPTY(&nextdisk->d_part) &&
+ nextdisk->d_pid == 0)
break;
}
if ((ret = startdisk(nextdisk, checkit)) != 0)