aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_cpuinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugin_cpuinfo.c')
-rw-r--r--plugin_cpuinfo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugin_cpuinfo.c b/plugin_cpuinfo.c
index 8c87573..0669c7c 100644
--- a/plugin_cpuinfo.c
+++ b/plugin_cpuinfo.c
@@ -113,18 +113,18 @@ static int parse_cpuinfo(char *oid)
size_t val_len;
if (sysctlbyname(oid, NULL, &val_len, NULL, 0) != 0) {
- error("Error %d by sysctl(%s): %s", errno, oid, strerror(errno));
- return -1;
+ error("Error %d by sysctl(%s): %s", errno, oid, strerror(errno));
+ return -1;
}
if (val_len > sizeof(val_ret)) {
- error("Error: Result of sysctl(%s) too big (%zd > %zd)!", oid, val_len, sizeof(val_ret));
- return -1;
+ error("Error: Result of sysctl(%s) too big (%zd > %zd)!", oid, val_len, sizeof(val_ret));
+ return -1;
}
sysctlbyname(oid, &val_ret, &val_len, NULL, 0);
if (val_len == sizeof(int)) {
- /* we got an integer instead of a string */
- val = (int*)val_ret;
- snprintf(val_ret, sizeof(val_ret), "%d", *val);
+ /* we got an integer instead of a string */
+ val = (int *) val_ret;
+ snprintf(val_ret, sizeof(val_ret), "%d", *val);
}
hash_put(&CPUinfo, oid, val_ret);
#endif