diff options
author | phk <phk@FreeBSD.org> | 1995-11-14 09:26:17 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-11-14 09:26:17 +0000 |
commit | c04786d47cc48af8b5d310ab8e4b48036736f605 (patch) | |
tree | d3e6b42f22d7a965bcc719eb0260fff36aa6f64a /sys/kern/kern_sysctl.c | |
parent | fb71a2c5dd79c13053c441b77755f40b2e7b1abe (diff) | |
download | FreeBSD-src-c04786d47cc48af8b5d310ab8e4b48036736f605.zip FreeBSD-src-c04786d47cc48af8b5d310ab8e4b48036736f605.tar.gz |
A couple of nitpicks.
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 414d75d..320ce64 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $Id: kern_sysctl.c,v 1.43 1995/11/14 09:17:32 phk Exp $ + * $Id: kern_sysctl.c,v 1.44 1995/11/14 09:22:15 phk Exp $ */ /* @@ -374,7 +374,6 @@ sysctl_old_kernel(struct sysctl_req *req, void *p, int l) static int sysctl_new_kernel(struct sysctl_req *req, void *p, int l) { - int i; if (!req->newptr) return 0; if (req->newlen - req->newidx < l) @@ -408,7 +407,7 @@ sysctl_old_user(struct sysctl_req *req, void *p, int l) static int sysctl_new_user(struct sysctl_req *req, void *p, int l) { - int error, i; + int error; if (!req->newptr) return 0; @@ -419,10 +418,6 @@ sysctl_new_user(struct sysctl_req *req, void *p, int l) return (error); } -#ifdef DEBUG -static sysctlfn debug_sysctl; -#endif - /* * Locking and stats */ @@ -544,13 +539,15 @@ static sysctlfn kern_sysctl; int userland_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *oldlenp, int inkernel, void *new, size_t newlen, int *retval) { - int error = 0, dolock = 1, i, oldlen = 0; + int error = 0, dolock = 1, oldlen = 0; u_int savelen = 0; sysctlfn *fn; struct sysctl_req req; bzero(&req, sizeof req); + req.p = p; + if (new != NULL && (error = suser(p->p_ucred, &p->p_acflag))) return (error); |