diff options
author | peter <peter@FreeBSD.org> | 1997-07-12 11:14:30 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-07-12 11:14:30 +0000 |
commit | e577692d0a1a79344ff02cde137a99d6bf9cab9c (patch) | |
tree | e55189f4e78b41408484c74bc1983295bd0b4a16 /lib/libc/gen/sysctlbyname.c | |
parent | 395891c085137a130a1fa4925eedace0106d128e (diff) | |
download | FreeBSD-src-e577692d0a1a79344ff02cde137a99d6bf9cab9c.zip FreeBSD-src-e577692d0a1a79344ff02cde137a99d6bf9cab9c.tar.gz |
Have sysctlbyname() take a const first arg (the ascii string)
Diffstat (limited to 'lib/libc/gen/sysctlbyname.c')
-rw-r--r-- | lib/libc/gen/sysctlbyname.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/gen/sysctlbyname.c b/lib/libc/gen/sysctlbyname.c index a3133af..9c4f346 100644 --- a/lib/libc/gen/sysctlbyname.c +++ b/lib/libc/gen/sysctlbyname.c @@ -6,14 +6,15 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id$ + * $Id: sysctlbyname.c,v 1.1 1997/05/30 20:53:13 phk Exp $ * */ #include <sys/types.h> #include <sys/sysctl.h> int -sysctlbyname(char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen) +sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, + size_t newlen) { int name2oid_oid[2]; int real_oid[CTL_MAXNAME+2]; @@ -23,7 +24,8 @@ sysctlbyname(char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen) name2oid_oid[1] = 3; oidlen = sizeof(real_oid); - error = sysctl(name2oid_oid, 2, real_oid, &oidlen, name, strlen(name)); + error = sysctl(name2oid_oid, 2, real_oid, &oidlen, (void *)name, + strlen(name)); if (error < 0) return error; oidlen /= sizeof (int); |