aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/fsck
diff options
context:
space:
mode:
authorMarcelo Araujo <araujo@FreeBSD.org>2016-04-18 07:44:53 +0000
committerMarcelo Araujo <araujo@FreeBSD.org>2016-04-18 07:44:53 +0000
commitcd5f6a0cc13d3e77f80bc4f0889c4b5691d6dad7 (patch)
treecf2368ca2c1444ab35b7787df7af9315af757be3 /sbin/fsck
parentfb6a35935ae8d2a2b6d5023979bc8f997bf54efa (diff)
downloadsrc-cd5f6a0cc13d3e77f80bc4f0889c4b5691d6dad7.tar.gz
src-cd5f6a0cc13d3e77f80bc4f0889c4b5691d6dad7.zip
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.
Notes
Notes: svn path=/head/; revision=298194
Diffstat (limited to 'sbin/fsck')
-rw-r--r--sbin/fsck/fsck.c2
-rw-r--r--sbin/fsck/preen.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c
index 63ff15326655..bf1892c3210c 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 18f280197895..d367eb2453d1 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;