diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-12 22:55:47 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-12 22:55:47 +0000 |
commit | 64332fef7de27c50f6522add770ceda556bdb4d6 (patch) | |
tree | 61d0fd2754e2e62ac62c940e80fcb04675619407 /sbin/fsck_ffs/main.c | |
parent | 5e2c24a43d150300de7952faf86b881bec60720a (diff) | |
download | FreeBSD-src-64332fef7de27c50f6522add770ceda556bdb4d6.zip FreeBSD-src-64332fef7de27c50f6522add770ceda556bdb4d6.tar.gz |
fsck_ffs for pointers replace 0 with NULL.
Found with devel/coccinelle.
Reviewed by: mckusick
Diffstat (limited to 'sbin/fsck_ffs/main.c')
-rw-r--r-- | sbin/fsck_ffs/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 08c7745..f2fb588 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -349,10 +349,10 @@ checkfilesys(char *filesys) pfatal( "CANNOT FIND SNAPSHOT DIRECTORY %s: %s, CANNOT RUN IN BACKGROUND\n", snapname, strerror(errno)); - } else if ((grp = getgrnam("operator")) == 0 || - mkdir(snapname, 0770) < 0 || - chown(snapname, -1, grp->gr_gid) < 0 || - chmod(snapname, 0770) < 0) { + } else if ((grp = getgrnam("operator")) == NULL || + mkdir(snapname, 0770) < 0 || + chown(snapname, -1, grp->gr_gid) < 0 || + chmod(snapname, 0770) < 0) { bkgrdflag = 0; pfatal( "CANNOT CREATE SNAPSHOT DIRECTORY %s: %s, CANNOT RUN IN BACKGROUND\n", |