Use char* for pointer arithmetic.

This commit is contained in:
he 2007-03-05 20:30:09 +00:00
parent 0261e46854
commit 068d2b32bc
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.41 2007/03/04 05:59:16 christos Exp $ */
/* $NetBSD: mem.c,v 1.42 2007/03/05 20:30:09 he Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.41 2007/03/04 05:59:16 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.42 2007/03/05 20:30:09 he Exp $");
/*
* Memory special file
@ -165,7 +165,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((char *)vmmap + o, c, uio);
pmap_remove(pmap_kernel(), (vm_offset_t)vmmap,
(vm_offset_t)vmmap + PAGE_SIZE);
pmap_update(pmap_kernel());
@ -234,7 +234,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;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mgnsc.c,v 1.41 2007/03/04 05:59:23 christos Exp $ */
/* $NetBSD: mgnsc.c,v 1.42 2007/03/05 20:31:04 he Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mgnsc.c,v 1.41 2007/03/04 05:59:23 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mgnsc.c,v 1.42 2007/03/05 20:31:04 he Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -118,7 +118,7 @@ mgnscattach(struct device *pdp, struct device *dp, void *auxp)
printf("\n");
zap = auxp;
sc->sc_siopp = rp = (siop_regmap_p)((void *)zap->va + 0x8000);
sc->sc_siopp = rp = (siop_regmap_p)((char *)zap->va + 0x8000);
/*
* CTEST7 = TT1