summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2004-04-13 00:15:29 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2004-04-13 00:15:29 +0000
commite7edfc7e3a719e4693ef9a5bc261b4b78ba1ad0e (patch)
tree3e89b421d70be0c14ca565e7a71136bdbcae3b7a /sys/kern
parentb0c537da711a0441d37c538f362c79c89945c8bb (diff)
useless caddr_t cast removal. same md5s.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_cluster.c10
-rw-r--r--sys/kern/vfs_conf.c4
-rw-r--r--sys/kern/vfs_lockf.c4
-rw-r--r--sys/kern/vfs_syscalls.c48
4 files changed, 33 insertions, 33 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 223f5df63d7..6d84cd1494a 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_cluster.c,v 1.31 2003/06/02 23:28:07 millert Exp $ */
+/* $OpenBSD: vfs_cluster.c,v 1.32 2004/04/13 00:15:28 tedu Exp $ */
/* $NetBSD: vfs_cluster.c,v 1.12 1996/04/22 01:39:05 christos Exp $ */
/*-
@@ -309,7 +309,7 @@ cluster_rbuild(vp, filesize, bp, lbn, blkno, size, run, flags)
b_save->bs_nchildren = 0;
b_save->bs_children = (struct buf **)(b_save + 1);
b_save->bs_saveaddr = bp->b_saveaddr;
- bp->b_saveaddr = (caddr_t) b_save;
+ bp->b_saveaddr = b_save;
inc = btodb(size);
for (bn = blkno + inc, i = 1; i <= run; ++i, bn += inc) {
@@ -330,7 +330,7 @@ cluster_rbuild(vp, filesize, bp, lbn, blkno, size, run, flags)
* in the callback routine.
*/
if (tbp->b_bufsize != 0) {
- caddr_t bdata = (char *)tbp->b_data;
+ caddr_t bdata = tbp->b_data;
/*
* No room in the buffer to add another page,
@@ -465,7 +465,7 @@ cluster_callback(bp)
brelse(bp);
else {
bp->b_flags &= ~B_WANTED;
- wakeup((caddr_t)bp);
+ wakeup(bp);
}
}
@@ -667,7 +667,7 @@ redo:
b_save->bs_nchildren = 0;
b_save->bs_children = (struct buf **)(b_save + 1);
b_save->bs_saveaddr = bp->b_saveaddr;
- bp->b_saveaddr = (caddr_t) b_save;
+ bp->b_saveaddr = b_save;
bp->b_flags |= B_CALL;
bp->b_iodone = cluster_callback;
diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c
index 28e9c04eb02..7ed2a32012b 100644
--- a/sys/kern/vfs_conf.c
+++ b/sys/kern/vfs_conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_conf.c,v 1.22 2003/08/14 07:46:39 mickey Exp $ */
+/* $OpenBSD: vfs_conf.c,v 1.23 2004/04/13 00:15:28 tedu Exp $ */
/* $NetBSD: vfs_conf.c,v 1.21.4.1 1995/11/01 00:06:26 jtc Exp $ */
/*
@@ -242,7 +242,7 @@ static struct vfsconf vfsconflist[] = {
* Initially the size of the list, vfs_init will set maxvfsconf
* to the highest defined type number.
*/
-int maxvfsconf = sizeof(vfsconflist) / sizeof (struct vfsconf);
+int maxvfsconf = sizeof(vfsconflist) / sizeof(struct vfsconf);
struct vfsconf *vfsconf = vfsconflist;
diff --git a/sys/kern/vfs_lockf.c b/sys/kern/vfs_lockf.c
index 301ed50dd21..4d1bf42f948 100644
--- a/sys/kern/vfs_lockf.c
+++ b/sys/kern/vfs_lockf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_lockf.c,v 1.8 2004/01/14 19:34:05 grange Exp $ */
+/* $OpenBSD: vfs_lockf.c,v 1.9 2004/04/13 00:15:28 tedu Exp $ */
/* $NetBSD: vfs_lockf.c,v 1.7 1996/02/04 02:18:21 christos Exp $ */
/*
@@ -673,7 +673,7 @@ lf_split(lock1, lock2)
* the encompassing lock
*/
splitlock = pool_get(&lockfpool, PR_WAITOK);
- memcpy(splitlock, lock1, sizeof (*splitlock));
+ memcpy(splitlock, lock1, sizeof(*splitlock));
splitlock->lf_start = lock2->lf_end + 1;
splitlock->lf_block.tqe_next = NULL;
TAILQ_INIT(&splitlock->lf_blkhd);
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 93e38884320..0550ac520e6 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.108 2004/01/06 04:18:18 tedu Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.109 2004/04/13 00:15:28 tedu Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -319,7 +319,7 @@ update:
} else {
mp->mnt_vnodecovered->v_mountedhere = (struct mount *)0;
vfs_unbusy(mp, p);
- free((caddr_t)mp, M_MOUNT);
+ free(mp, M_MOUNT);
vput(vp);
}
return (error);
@@ -487,7 +487,7 @@ dounmount(struct mount *mp, int flags, struct proc *p, struct vnode *olddp)
if (mp->mnt_vnodelist.lh_first != NULL)
panic("unmount: dangling vnode");
lockmgr(&mp->mnt_lock, LK_RELEASE | LK_INTERLOCK, &mountlist_slock, p);
- free((caddr_t)mp, M_MOUNT);
+ free(mp, M_MOUNT);
return (0);
}
@@ -601,11 +601,11 @@ sys_statfs(p, v, retval)
#endif
/* Don't let non-root see filesystem id (for NFS security) */
if (suser(p, 0)) {
- bcopy((caddr_t)sp, (caddr_t)&sb, sizeof(sb));
+ bcopy(sp, &sb, sizeof(sb));
sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0;
sp = &sb;
}
- return (copyout((caddr_t)sp, (caddr_t)SCARG(uap, buf), sizeof(*sp)));
+ return (copyout(sp, SCARG(uap, buf), sizeof(*sp)));
}
/*
@@ -647,11 +647,11 @@ sys_fstatfs(p, v, retval)
#endif
/* Don't let non-root see filesystem id (for NFS security) */
if (suser(p, 0)) {
- bcopy((caddr_t)sp, (caddr_t)&sb, sizeof(sb));
+ bcopy(sp, &sb, sizeof(sb));
sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0;
sp = &sb;
}
- return (copyout((caddr_t)sp, (caddr_t)SCARG(uap, buf), sizeof(*sp)));
+ return (copyout(sp, SCARG(uap, buf), sizeof(*sp)));
}
/*
@@ -671,12 +671,12 @@ sys_getfsstat(p, v, retval)
register struct mount *mp, *nmp;
register struct statfs *sp;
struct statfs sb;
- caddr_t sfsp;
+ struct statfs *sfsp;
size_t count, maxcount;
int error, flags = SCARG(uap, flags);
maxcount = SCARG(uap, bufsize) / sizeof(struct statfs);
- sfsp = (caddr_t)SCARG(uap, buf);
+ sfsp = SCARG(uap, buf);
count = 0;
simple_lock(&mountlist_slock);
for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
@@ -706,16 +706,16 @@ sys_getfsstat(p, v, retval)
sp->f_eflags = STATFS_SOFTUPD;
#endif
if (suser(p, 0)) {
- bcopy((caddr_t)sp, (caddr_t)&sb, sizeof(sb));
+ bcopy(sp, &sb, sizeof(sb));
sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0;
sp = &sb;
}
- error = copyout((caddr_t)sp, sfsp, sizeof(*sp));
+ error = copyout(sp, sfsp, sizeof(*sp));
if (error) {
vfs_unbusy(mp, p);
return (error);
}
- sfsp += sizeof(*sp);
+ sfsp++;
}
count++;
simple_lock(&mountlist_slock);
@@ -925,7 +925,7 @@ sys_open(p, v, retval)
fp->f_flag = flags & FMASK;
fp->f_type = DTYPE_VNODE;
fp->f_ops = &vnops;
- fp->f_data = (caddr_t)vp;
+ fp->f_data = vp;
if (flags & (O_EXLOCK | O_SHLOCK)) {
lf.l_whence = SEEK_SET;
lf.l_start = 0;
@@ -1007,13 +1007,13 @@ sys_getfh(p, v, retval)
if (error)
return (error);
vp = nd.ni_vp;
- bzero((caddr_t)&fh, sizeof(fh));
+ bzero(&fh, sizeof(fh));
fh.fh_fsid = vp->v_mount->mnt_stat.f_fsid;
error = VFS_VPTOFH(vp, &fh.fh_fid);
vput(vp);
if (error)
return (error);
- error = copyout((caddr_t)&fh, (caddr_t)SCARG(uap, fhp), sizeof (fh));
+ error = copyout(&fh, SCARG(uap, fhp), sizeof(fh));
return (error);
}
@@ -1113,7 +1113,7 @@ sys_fhopen(p, v, retval)
fp->f_flag = flags & FMASK;
fp->f_type = DTYPE_VNODE;
fp->f_ops = &vnops;
- fp->f_data = (caddr_t)vp;
+ fp->f_data = vp;
if (flags & (O_EXLOCK | O_SHLOCK)) {
lf.l_whence = SEEK_SET;
lf.l_start = 0;
@@ -1668,7 +1668,7 @@ sys_stat(p, v, retval)
/* Don't let non-root see generation numbers (for NFS security) */
if (suser(p, 0))
sb.st_gen = 0;
- error = copyout((caddr_t)&sb, (caddr_t)SCARG(uap, ub), sizeof (sb));
+ error = copyout(&sb, SCARG(uap, ub), sizeof(sb));
return (error);
}
@@ -1701,7 +1701,7 @@ sys_lstat(p, v, retval)
/* Don't let non-root see generation numbers (for NFS security) */
if (suser(p, 0))
sb.st_gen = 0;
- error = copyout((caddr_t)&sb, (caddr_t)SCARG(uap, ub), sizeof (sb));
+ error = copyout(&sb, SCARG(uap, ub), sizeof(sb));
return (error);
}
@@ -2130,8 +2130,8 @@ sys_utimes(p, v, retval)
tv[1] = tv[0];
vattr.va_vaflags |= VA_UTIMES_NULL;
} else {
- error = copyin((caddr_t)SCARG(uap, tptr), (caddr_t)tv,
- sizeof (tv));
+ error = copyin(SCARG(uap, tptr), tv,
+ sizeof(tv));
if (error)
return (error);
/* XXX workaround timeval matching the VFS constant VNOVAL */
@@ -2186,8 +2186,8 @@ sys_futimes(p, v, retval)
tv[1] = tv[0];
vattr.va_vaflags |= VA_UTIMES_NULL;
} else {
- error = copyin((caddr_t)SCARG(uap, tptr), (caddr_t)tv,
- sizeof (tv));
+ error = copyin(SCARG(uap, tptr), tv,
+ sizeof(tv));
if (error)
return (error);
/* XXX workaround timeval matching the VFS constant VNOVAL */
@@ -2582,12 +2582,12 @@ unionread:
struct vnode *tvp = vp;
vp = vp->v_mount->mnt_vnodecovered;
VREF(vp);
- fp->f_data = (caddr_t) vp;
+ fp->f_data = vp;
fp->f_offset = 0;
vrele(tvp);
goto unionread;
}
- error = copyout((caddr_t)&loff, (caddr_t)SCARG(uap, basep),
+ error = copyout(&loff, SCARG(uap, basep),
sizeof(long));
*retval = SCARG(uap, count) - auio.uio_resid;
bad: