Eliminate redundant variable.
This commit is contained in:
parent
4587cbadc5
commit
997b5d9426
@ -19,13 +19,10 @@ sysctlbyname(const char *name, void *oldp, size_t *oldlenp,
|
||||
const void *newp, size_t newlen)
|
||||
{
|
||||
int real_oid[CTL_MAXNAME+2];
|
||||
int error;
|
||||
size_t oidlen;
|
||||
|
||||
oidlen = sizeof(real_oid) / sizeof(int);
|
||||
error = sysctlnametomib(name, real_oid, &oidlen);
|
||||
if (error < 0)
|
||||
return (error);
|
||||
error = sysctl(real_oid, oidlen, oldp, oldlenp, newp, newlen);
|
||||
return (error);
|
||||
if (sysctlnametomib(name, real_oid, &oidlen) < 0)
|
||||
return (-1);
|
||||
return (sysctl(real_oid, oidlen, oldp, oldlenp, newp, newlen));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user