#include "../util.h"
-const char *
+static const char *
format(int uptime)
{
int h, m;
size = sizeof(boottime);
- if (sysctl(mib, 2, &boottime, &size, NULL, 0) == -1) {
- fprintf(stderr, "sysctl 'KERN_BOOTTIME': %s\n", strerror(errno));
+ if (sysctl(mib, 2, &boottime, &size, NULL, 0) < 0) {
+ warn("sysctl 'KERN_BOOTTIME':");
return NULL;
}