From 72f82d096c05dc97b26f9ca30093343161dc4444 Mon Sep 17 00:00:00 2001 From: TingPing Date: Thu, 11 Dec 2014 09:57:11 -0500 Subject: Fix some warnings in xsys - Remove unused code - Fix leak --- plugins/sysinfo/parse.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) (limited to 'plugins/sysinfo/parse.c') 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; -} -- cgit 1.4.1