summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-06-09 13:10:20 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-06-09 13:10:20 +0000
commitc185282e07c2dfb5c20e709d41c728d10c5b1d7e (patch)
tree89b8903c2c60572e9c0e707020eb353c157e05b0 /lib
parent6404a3579c03e2f97a6c2dc789e41410d1fb57cd (diff)
Constify the mib argument of sysctl().
ok matthew@ millert@
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/sysctl.34
-rw-r--r--lib/libc/gen/sysctl.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
index 0e057697343..c074df9c0f9 100644
--- a/lib/libc/gen/sysctl.3
+++ b/lib/libc/gen/sysctl.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sysctl.3,v 1.223 2013/06/09 13:03:47 tedu Exp $
+.\" $OpenBSD: sysctl.3,v 1.224 2013/06/09 13:10:17 miod Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -37,7 +37,7 @@
.In sys/param.h
.In sys/sysctl.h
.Ft int
-.Fn sysctl "int *name" "u_int namelen" "void *oldp" "size_t *oldlenp" "void *newp" "size_t newlen"
+.Fn sysctl "const int *name" "u_int namelen" "void *oldp" "size_t *oldlenp" "void *newp" "size_t newlen"
.Sh DESCRIPTION
The
.Fn sysctl
diff --git a/lib/libc/gen/sysctl.c b/lib/libc/gen/sysctl.c
index 941ae1aafd5..b0eea554bcb 100644
--- a/lib/libc/gen/sysctl.c
+++ b/lib/libc/gen/sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.c,v 1.8 2013/04/15 16:47:14 guenther Exp $ */
+/* $OpenBSD: sysctl.c,v 1.9 2013/06/09 13:10:17 miod Exp $ */
/*-
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
@@ -31,10 +31,10 @@
#include <sys/param.h>
#include <sys/sysctl.h>
-int __sysctl(int *, u_int, void *, size_t *, void *, size_t);
+int __sysctl(const int *, u_int, void *, size_t *, void *, size_t);
int
-sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
+sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
size_t newlen)
{
return (__sysctl(name, namelen, oldp, oldlenp, newp, newlen));