svn commit: r194296 - in head/sys: gnu/fs/ext2fs kern ufs/ufs
Konstantin Belousov
kib at FreeBSD.org
Tue Jun 16 15:13:47 UTC 2009
Author: kib
Date: Tue Jun 16 15:13:45 2009
New Revision: 194296
URL: http://svn.freebsd.org/changeset/base/194296
Log:
Do not use casts (int *)0 and (struct thread *)0 for the arguments of
vn_rdwr, use NULL.
Reviewed by: jhb
MFC after: 1 week
Modified:
head/sys/gnu/fs/ext2fs/ext2_lookup.c
head/sys/gnu/fs/ext2fs/ext2_vnops.c
head/sys/kern/kern_acct.c
head/sys/ufs/ufs/ufs_lookup.c
head/sys/ufs/ufs/ufs_vnops.c
Modified: head/sys/gnu/fs/ext2fs/ext2_lookup.c
==============================================================================
--- head/sys/gnu/fs/ext2fs/ext2_lookup.c Tue Jun 16 15:13:18 2009 (r194295)
+++ head/sys/gnu/fs/ext2fs/ext2_lookup.c Tue Jun 16 15:13:45 2009 (r194296)
@@ -1048,8 +1048,8 @@ ext2_checkpath(source, target, cred)
}
error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf,
sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
- IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, (int *)0,
- (struct thread *)0);
+ IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, NULL,
+ NULL);
if (error != 0)
break;
namlen = dirbuf.dotdot_type; /* like ufs little-endian */
Modified: head/sys/gnu/fs/ext2fs/ext2_vnops.c
==============================================================================
--- head/sys/gnu/fs/ext2fs/ext2_vnops.c Tue Jun 16 15:13:18 2009 (r194295)
+++ head/sys/gnu/fs/ext2fs/ext2_vnops.c Tue Jun 16 15:13:45 2009 (r194296)
@@ -1048,8 +1048,7 @@ abortit:
error = vn_rdwr(UIO_READ, fvp, (caddr_t)&dirbuf,
sizeof (struct dirtemplate), (off_t)0,
UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
- tcnp->cn_cred, NOCRED, (int *)0,
- (struct thread *)0);
+ tcnp->cn_cred, NOCRED, NULL, NULL);
if (error == 0) {
/* Like ufs little-endian: */
namlen = dirbuf.dotdot_type;
@@ -1066,8 +1065,7 @@ abortit:
(off_t)0, UIO_SYSSPACE,
IO_NODELOCKED | IO_SYNC |
IO_NOMACCHECK, tcnp->cn_cred,
- NOCRED, (int *)0,
- (struct thread *)0);
+ NOCRED, NULL, NULL);
cache_purge(fdvp);
}
}
@@ -1203,7 +1201,7 @@ ext2_mkdir(ap)
error = vn_rdwr(UIO_WRITE, tvp, (caddr_t)&dirtemplate,
sizeof (dirtemplate), (off_t)0, UIO_SYSSPACE,
IO_NODELOCKED | IO_SYNC | IO_NOMACCHECK, cnp->cn_cred, NOCRED,
- (int *)0, (struct thread *)0);
+ NULL, NULL);
if (error) {
dp->i_nlink--;
dp->i_flag |= IN_CHANGE;
@@ -1340,7 +1338,7 @@ ext2_symlink(ap)
} else
error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0,
UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
- ap->a_cnp->cn_cred, NOCRED, (int *)0, (struct thread *)0);
+ ap->a_cnp->cn_cred, NOCRED, NULL, NULL);
if (error)
vput(vp);
return (error);
Modified: head/sys/kern/kern_acct.c
==============================================================================
--- head/sys/kern/kern_acct.c Tue Jun 16 15:13:18 2009 (r194295)
+++ head/sys/kern/kern_acct.c Tue Jun 16 15:13:45 2009 (r194296)
@@ -436,7 +436,7 @@ acct_process(struct thread *td)
vfslocked = VFS_LOCK_GIANT(acct_vp->v_mount);
ret = vn_rdwr(UIO_WRITE, acct_vp, (caddr_t)&acct, sizeof (acct),
(off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, acct_cred, NOCRED,
- (int *)0, td);
+ NULL, td);
VFS_UNLOCK_GIANT(vfslocked);
sx_sunlock(&acct_sx);
return (ret);
Modified: head/sys/ufs/ufs/ufs_lookup.c
==============================================================================
--- head/sys/ufs/ufs/ufs_lookup.c Tue Jun 16 15:13:18 2009 (r194295)
+++ head/sys/ufs/ufs/ufs_lookup.c Tue Jun 16 15:13:45 2009 (r194296)
@@ -1247,7 +1247,7 @@ ufs_dir_dd_ino(struct vnode *vp, struct
return (ENOTDIR);
error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf,
sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
- IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, (int *)0, NULL);
+ IO_NODELOCKED | IO_NOMACCHECK, cred, NOCRED, NULL, NULL);
if (error != 0)
return (error);
#if (BYTE_ORDER == LITTLE_ENDIAN)
Modified: head/sys/ufs/ufs/ufs_vnops.c
==============================================================================
--- head/sys/ufs/ufs/ufs_vnops.c Tue Jun 16 15:13:18 2009 (r194295)
+++ head/sys/ufs/ufs/ufs_vnops.c Tue Jun 16 15:13:45 2009 (r194296)
@@ -1849,7 +1849,7 @@ ufs_symlink(ap)
} else
error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0,
UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
- ap->a_cnp->cn_cred, NOCRED, (int *)0, (struct thread *)0);
+ ap->a_cnp->cn_cred, NOCRED, NULL, NULL);
if (error)
vput(vp);
return (error);
More information about the svn-src-all
mailing list