summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ufs
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-10 21:48:11 +0000
committerpfg <pfg@FreeBSD.org>2016-04-10 21:48:11 +0000
commit858f336801b9b036dd48c5e5d8f38c3441aa5686 (patch)
tree929f398725ded2ca76272a013624574c617ca748 /sys/ufs/ufs
parent6e91d78151e10ed31c475cafe6a1e1f11950c1d9 (diff)
downloadFreeBSD-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.c3
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);
}
OpenPOWER on IntegriCloud