diff options
author | araujo <araujo@FreeBSD.org> | 2016-04-18 07:44:53 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2016-04-18 07:44:53 +0000 |
commit | 048481b9dc03d74ad8acf4c952c3883e2c1cacdf (patch) | |
tree | cf2368ca2c1444ab35b7787df7af9315af757be3 /sbin | |
parent | ebd15428b53018b5ab0e8d1fdcba7bfd016dd3b9 (diff) | |
download | FreeBSD-src-048481b9dc03d74ad8acf4c952c3883e2c1cacdf.zip FreeBSD-src-048481b9dc03d74ad8acf4c952c3883e2c1cacdf.tar.gz |
strchr(3) will return NULL if it cannot find the character in the
string.
getfsent(3) will return NULL on EOF or error.
MFC after: 2 weeks.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/fsck/fsck.c | 2 | ||||
-rw-r--r-- | sbin/fsck/preen.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c index 63ff153..bf1892c 100644 --- a/sbin/fsck/fsck.c +++ b/sbin/fsck/fsck.c @@ -200,7 +200,7 @@ main(int argc, char *argv[]) mntpt = NULL; spec = *argv; cp = strrchr(spec, '/'); - if (cp == 0) { + if (cp == NULL) { (void)snprintf(device, sizeof(device), "%s%s", _PATH_DEV, spec); spec = device; diff --git a/sbin/fsck/preen.c b/sbin/fsck/preen.c index 18f2801..d367eb2 100644 --- a/sbin/fsck/preen.c +++ b/sbin/fsck/preen.c @@ -106,7 +106,7 @@ checkfstab(int flags, int (*docheck)(struct fstab *), warnx("Can't open checklist file: %s\n", _PATH_FSTAB); return (8); } - while ((fs = getfsent()) != 0) { + while ((fs = getfsent()) != NULL) { name = fs->fs_spec; if (fs->fs_passno > passno && fs->fs_passno < nextpass) nextpass = fs->fs_passno; |