diff options
-rw-r--r-- | lib/libc/gen/sysctlnametomib.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libc/gen/sysctlnametomib.c b/lib/libc/gen/sysctlnametomib.c index 4cfa5c2..17a2a1e 100644 --- a/lib/libc/gen/sysctlnametomib.c +++ b/lib/libc/gen/sysctlnametomib.c @@ -47,9 +47,7 @@ sysctlnametomib(const char *name, int *mibp, size_t *sizep) oid[1] = 3; *sizep *= sizeof (int); - error = sysctl(oid, 2, mibp, sizep, name, strlen(name)); + error = sysctl(oid, 2, mibp, sizep, (void *)name, strlen(name)); *sizep /= sizeof (int); - if (error < 0) - return (error); - return (0); + return (error); } |