[collectd] [PATCH] sensors: declare variables only if SENSORS_HAVE_READ

Lubos Stanek kolektor<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>atlas.cz
Tue Dec 5 19:09:33 CET 2006


Signed-off-by: Stanek Lubos <kolektor<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>atlas.cz>
---
 src/sensors.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/sensors.c b/src/sensors.c
index 352ecf7..ff8b580 100644
--- a/src/sensors.c
+++ b/src/sensors.c
@@ -337,12 +337,10 @@ #endif /* if SENSORS_HAVE_READ */
 
 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 @@ #if SENSORS_HAVE_READ
 
 	sensors_cleanup ();
 #endif /* if SENSORS_HAVE_READ */
+
+	ignorelist_free (sensor_list);
 }
 
 static void sensors_voltage_write (char *host, char *inst, char *val)
-- 
1.4.2.4




More information about the collectd mailing list