diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-06-24 05:01:37 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-06-24 05:01:37 +0000 |
commit | 054b4f11750f6fb7bb997a48ff890bd8b0e100ac (patch) | |
tree | fb167150ff26f9ee71fb7762c16820ebc2634672 /sys | |
parent | 7470294b6b6962b093f9fa97f93f5c8b3d6efa1d (diff) |
prototype cleanup, use local variable for const input arg.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/powerpc/powerpc/copyinstr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/powerpc/powerpc/copyinstr.c b/sys/arch/powerpc/powerpc/copyinstr.c index 15d4312bd39..843fe6befab 100644 --- a/sys/arch/powerpc/powerpc/copyinstr.c +++ b/sys/arch/powerpc/powerpc/copyinstr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: copyinstr.c,v 1.4 2000/01/14 05:42:17 rahnds Exp $ */ +/* $OpenBSD: copyinstr.c,v 1.5 2001/06/24 05:01:36 drahn Exp $ */ /*- * Copyright (C) 1995 Wolfgang Solfrank. @@ -32,23 +32,25 @@ */ #include <sys/param.h> #include <sys/errno.h> +#include <sys/systm.h> /* * Emulate copyinstr. */ int copyinstr(udaddr, kaddr, len, done) - void *udaddr; + const void *udaddr; void *kaddr; size_t len; size_t *done; { int c; + void *uaddr = (void *)udaddr; u_char *kp = kaddr; int l; for (l = 0; len-- > 0; l++) { - if ((c = fubyte(udaddr++)) < 0) { + if ((c = fubyte(uaddr++)) < 0) { *done = l; return EFAULT; } |