diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-10 21:48:11 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-10 21:48:11 +0000 |
commit | 858f336801b9b036dd48c5e5d8f38c3441aa5686 (patch) | |
tree | 929f398725ded2ca76272a013624574c617ca748 /sys/ufs/ufs | |
parent | 6e91d78151e10ed31c475cafe6a1e1f11950c1d9 (diff) | |
download | FreeBSD-src-858f336801b9b036dd48c5e5d8f38c3441aa5686.zip FreeBSD-src-858f336801b9b036dd48c5e5d8f38c3441aa5686.tar.gz |
ufs: replace 0 with NULL for pointers.
While here also do late initialization of the variables we are
changing.
Found with devel/coccinelle.
Reviewed by: mckusick
MFC after: 2 weeks
Diffstat (limited to 'sys/ufs/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_lookup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index 408349e..972cee1 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -1256,7 +1256,8 @@ out: * drop its snapshot reference so that it will be reclaimed * when last open reference goes away. */ - if (ip != 0 && (ip->i_flags & SF_SNAPSHOT) != 0 && ip->i_effnlink == 0) + if (ip != NULL && (ip->i_flags & SF_SNAPSHOT) != 0 && + ip->i_effnlink == 0) UFS_SNAPGONE(ip); return (error); } |