diff options
author | TingPing <tingping@tingping.se> | 2014-12-11 09:57:11 -0500 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-12-11 10:05:05 -0500 |
commit | 72f82d096c05dc97b26f9ca30093343161dc4444 (patch) | |
tree | d81d596e0843823808d8f63c116a789c61965384 /plugins/sysinfo/parse.c | |
parent | 74ff67acd3a51253c4941bc7322af346d408f47b (diff) |
Fix some warnings in xsys
- Remove unused code - Fix leak
Diffstat (limited to 'plugins/sysinfo/parse.c')
-rw-r--r-- | plugins/sysinfo/parse.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/plugins/sysinfo/parse.c b/plugins/sysinfo/parse.c index 3f1ad6c5..6c86c645 100644 --- a/plugins/sysinfo/parse.c +++ b/plugins/sysinfo/parse.c @@ -32,7 +32,6 @@ #include "pci.h" #include "match.h" -#include "hwmon.h" #include "xsys.h" #include "parse.h" @@ -47,7 +46,8 @@ int xs_parse_cpu(char *model, char *vendor, double *freq, char *cache, unsigned FILE *fp = fopen("/proc/cpuinfo", "r"); if(fp == NULL) return 1; - if(count != NULL) *count = 0; + + *count = 0; strcpy(cache,"unknown\0"); #if defined(__i386__) || defined(__x86_64__) @@ -435,28 +435,3 @@ int xs_parse_distro(char *name) strcpy(name, buffer); return 0; } - -int xs_parse_hwmon_chip(char *chip) -{ - if (!hwmon_chip_present()) - return 1; -#if 0 - else - get_hwmon_chip_name(chip); -#endif - return 0; -} - -int xs_parse_hwmon_temp(char *temp, unsigned int *sensor) -{ - unsigned int value; - float celsius; - - if (!hwmon_chip_present()) - return 1; - else - get_hwmon_temp(&value, sensor); - celsius = (float)value; - snprintf(temp, bsize, "%.1fC", celsius/1000.0); - return 0; -} |