From: Lubos Stanek Date: Tue, 5 Dec 2006 18:09:33 +0000 (+0100) Subject: sensors plugin: declare variables only if SENSORS_HAVE_READ X-Git-Tag: collectd-3.11.0~26^2~4^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ed8dda96183e5655fa6bbca0b779e83aa4db7687;p=collectd.git sensors plugin: declare variables only if SENSORS_HAVE_READ Signed-off-by: Stanek Lubos --- diff --git a/src/sensors.c b/src/sensors.c index 352ecf73..ff8b580d 100644 --- a/src/sensors.c +++ b/src/sensors.c @@ -337,12 +337,10 @@ static void collectd_sensors_init (void) static void sensors_shutdown (void) { +#if SENSORS_HAVE_READ featurelist_t *thisft = first_feature; featurelist_t *nextft; - ignorelist_free (sensor_list); - -#if SENSORS_HAVE_READ while (thisft != NULL) { nextft = thisft->next; @@ -352,6 +350,8 @@ static void sensors_shutdown (void) sensors_cleanup (); #endif /* if SENSORS_HAVE_READ */ + + ignorelist_free (sensor_list); } static void sensors_voltage_write (char *host, char *inst, char *val)