From c185282e07c2dfb5c20e709d41c728d10c5b1d7e Mon Sep 17 00:00:00 2001
From: Miod Vallat <miod@cvs.openbsd.org>
Date: Sun, 9 Jun 2013 13:10:20 +0000
Subject: Constify the mib argument of sysctl(). ok matthew@ millert@

---
 lib/libc/gen/sysctl.3 | 4 ++--
 lib/libc/gen/sysctl.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

(limited to 'lib/libc')

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));
-- 
cgit v1.2.3