summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0d402ed)
raw | patch | inline | side by side (parent: 0d402ed)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 23 Dec 2006 13:01:14 +0000 (14:01 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Tue, 9 Jan 2007 13:54:31 +0000 (14:54 +0100) |
If the sensors plugin is not configured (i.e. default settings are used) the
ignorelist (sensors_list) is never created causing the assertion in
ignorelist_match () to fail. This fixes it.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
ignorelist (sensors_list) is never created causing the assertion in
ignorelist_match () to fail. This fixes it.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
src/sensors.c | patch | blob | history |
diff --git a/src/sensors.c b/src/sensors.c
index d15569c03a95d58ad361fa7c239ba4faebdd8dba..66cd5b226dea80f8fc22366af2c2a769c7fd59b1 100644 (file)
--- a/src/sensors.c
+++ b/src/sensors.c
sensors_free_features ();
#endif /* if SENSORS_HAVE_READ */
- ignorelist_free (sensor_list);
+ if (NULL != sensor_list)
+ ignorelist_free (sensor_list);
}
static void sensors_voltage_write (char *host, char *inst, char *val)
int status;
/* skip ignored in our config */
- if (ignorelist_match (sensor_list, inst))
+ if ((NULL != sensor_list) && ignorelist_match (sensor_list, inst))
return;
/* extended sensor naming */
int status;
/* skip ignored in our config */
- if (ignorelist_match (sensor_list, inst))
+ if ((NULL != sensor_list) && ignorelist_match (sensor_list, inst))
return;
/* extended sensor naming */
return;
/* skip ignored in our config */
- if (ignorelist_match (sensor_list, inst))
+ if ((NULL != sensor_list) && ignorelist_match (sensor_list, inst))
return;
if (snprintf (buf, BUFSIZE, "%u:%.3f", (unsigned int) curtime,