Remove unused function act_getkernstring
This fixes a clang -Wunused warning Differential Revision: https://reviews.freebsd.org/D4697 MFC after: 1 week Reported by: Jenkins Reviewed by: araujo, bapt Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
7659430654
commit
a8cab145cb
@ -59,29 +59,6 @@ static const struct asn_oid
|
||||
oid_freeBSDVersion = OIDX_freeBSDVersion;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Get a string value from the KERN sysctl subtree.
|
||||
*/
|
||||
static char *
|
||||
act_getkernstring(int id)
|
||||
{
|
||||
int mib[2];
|
||||
size_t len;
|
||||
char *string;
|
||||
|
||||
mib[0] = CTL_KERN;
|
||||
mib[1] = id;
|
||||
if (sysctl(mib, 2, NULL, &len, NULL, 0) != 0)
|
||||
return (NULL);
|
||||
if ((string = malloc(len)) == NULL)
|
||||
return (NULL);
|
||||
if (sysctl(mib, 2, string, &len, NULL, 0) != 0) {
|
||||
free(string);
|
||||
return (NULL);
|
||||
}
|
||||
return (string);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get an integer value from the KERN sysctl subtree.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user