Remove an unnecessary cast and use (char *) on pointer arith.

This commit is contained in:
tsutsui 2007-03-04 12:49:10 +00:00
parent 6286e7e090
commit a4a1365daf
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.12 2007/03/04 06:00:04 christos Exp $ */
/* $NetBSD: mem.c,v 1.13 2007/03/04 12:49:10 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@ -74,7 +74,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.12 2007/03/04 06:00:04 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.13 2007/03/04 12:49:10 tsutsui Exp $");
/*
* Memory special file
@ -156,7 +156,7 @@ mmrw(dev, uio, flags)
pmap_update(pmap_kernel());
o = uio->uio_offset & PGOFSET;
c = min(uio->uio_resid, (int)(PAGE_SIZE - o));
error = uiomove((void *)vmmap + o, c, uio);
error = uiomove(vmmap + o, c, uio);
pmap_remove(pmap_kernel(), (vaddr_t)vmmap,
(vaddr_t)vmmap + PAGE_SIZE);
pmap_update(pmap_kernel());
@ -199,7 +199,7 @@ mmrw(dev, uio, flags)
}
if (error)
break;
iov->iov_base = (void *)iov->iov_base + c;
iov->iov_base = (char *)iov->iov_base + c;
iov->iov_len -= c;
uio->uio_offset += c;
uio->uio_resid -= c;