diff options
author | peter <peter@FreeBSD.org> | 1996-01-01 17:05:07 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-01-01 17:05:07 +0000 |
commit | b8347dacd23c8f9fdf9e10d40808f826564e3941 (patch) | |
tree | 4b5dbd35ff1b3d38dbf049c19ac2131f74ae2cc8 /sys/kern/kern_sysctl.c | |
parent | f8641e6c8cd69fb7425ede60150e4bcc0204591a (diff) | |
download | FreeBSD-src-b8347dacd23c8f9fdf9e10d40808f826564e3941.zip FreeBSD-src-b8347dacd23c8f9fdf9e10d40808f826564e3941.tar.gz |
Fix the reversed source and dest args to bcopy() in the kernel space
sysctl handler (ouch!)
Add a "const" qualifier to the source of the copyin() and copyout()
functions - the other const warning in kern_sysctl.c was silenced when
copyout was declared as having a const source.. (which it is)
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index a06b214..c8c48ee 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $Id: kern_sysctl.c,v 1.57 1995/12/14 08:31:36 phk Exp $ + * $Id: kern_sysctl.c,v 1.58 1995/12/17 21:11:22 phk Exp $ */ #include <sys/param.h> @@ -721,7 +721,7 @@ sysctl_new_kernel(struct sysctl_req *req, const void *p, int l) return 0; if (req->newlen - req->newidx < l) return (EINVAL); - bcopy(req->newptr + req->newidx, p, l); + bcopy(p, req->newptr + req->newidx, l); req->newidx += l; return (0); } |