Use NULL instead of 0

This commit is contained in:
Kevin Lo 2012-03-13 10:04:13 +00:00
parent 7295465e33
commit 11753bd018
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=232918
4 changed files with 7 additions and 7 deletions

View File

@ -98,7 +98,7 @@ fdesc_mount(struct mount *mp)
error = fdesc_allocvp(Froot, -1, FD_ROOT, mp, &rvp);
if (error) {
free(fmp, M_FDESCMNT);
mp->mnt_data = 0;
mp->mnt_data = NULL;
return (error);
}
rvp->v_type = VDIR;
@ -152,7 +152,7 @@ fdesc_unmount(mp, mntflags)
*/
mtx_lock(&fdesc_hashmtx);
data = mp->mnt_data;
mp->mnt_data = 0;
mp->mnt_data = NULL;
mtx_unlock(&fdesc_hashmtx);
free(data, M_FDESCMNT); /* XXX */

View File

@ -188,7 +188,7 @@ nullfs_mount(struct mount *mp)
mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag &
(MNTK_MPSAFE | MNTK_SHARED_WRITES);
MNT_IUNLOCK(mp);
mp->mnt_data = xmp;
mp->mnt_data = xmp;
vfs_getnewfsid(mp);
vfs_mountedfrom(mp, target);
@ -224,7 +224,7 @@ nullfs_unmount(mp, mntflags)
* Finally, throw away the null_mount structure
*/
mntdata = mp->mnt_data;
mp->mnt_data = 0;
mp->mnt_data = NULL;
free(mntdata, M_NULLFSMNT);
return 0;
}

View File

@ -164,7 +164,7 @@ portal_mount(struct mount *mp)
MNT_ILOCK(mp);
mp->mnt_flag |= MNT_LOCAL;
MNT_IUNLOCK(mp);
mp->mnt_data = fmp;
mp->mnt_data = fmp;
vfs_getnewfsid(mp);
vfs_mountedfrom(mp, p);
@ -213,7 +213,7 @@ portal_unmount(mp, mntflags)
* Finally, throw away the portalmount structure
*/
free(mp->mnt_data, M_PORTALFSMNT); /* XXX */
mp->mnt_data = 0;
mp->mnt_data = NULL;
return (0);
}

View File

@ -352,7 +352,7 @@ unionfs_unmount(struct mount *mp, int mntflags)
return (error);
free(ump, M_UNIONFSMNT);
mp->mnt_data = 0;
mp->mnt_data = NULL;
return (0);
}