aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_cpuinfo.c
diff options
context:
space:
mode:
authorvolker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2010-01-15 21:44:04 +0000
committervolker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2010-01-15 21:44:04 +0000
commit69fecdd3d64aac4d19a2fa5777ea2b6c017fe9cf (patch)
tree67eb5f0c723e5942405bae3f8a4aef62ec1c35df /plugin_cpuinfo.c
parentac266e1877dfa2042a00b239ac184ce40e538770 (diff)
downloadlcd4linux-69fecdd3d64aac4d19a2fa5777ea2b6c017fe9cf.tar.gz
Ticket 182
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1079 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
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