summaryrefslogtreecommitdiff
path: root/plugins/hddtemp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/hddtemp')
-rw-r--r--plugins/hddtemp/hddtemp-plugin.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/hddtemp/hddtemp-plugin.c b/plugins/hddtemp/hddtemp-plugin.c
index 8fdd6a3..220c830 100644
--- a/plugins/hddtemp/hddtemp-plugin.c
+++ b/plugins/hddtemp/hddtemp-plugin.c
@@ -151,7 +151,12 @@ static void hddtemp_plugin_get_sensors(GList **sensors) {
pv = output_vector = g_strsplit(hddtemp_output, "|", -1);
while(pv[1] != NULL) {
- if (g_strcmp0(pv[2], "") && g_strcmp0(pv[3], "") && g_strcmp0(pv[4], "") && (!(g_ascii_strcasecmp(pv[2], "???") == 0 || g_ascii_strcasecmp(pv[3], "ERR") == 0 || g_ascii_strcasecmp(pv[4], "*") == 0))) {
+ if (strcmp(pv[2], "") != 0 &&
+ strcmp(pv[3], "") != 0 &&
+ strcmp(pv[4], "") != 0 &&
+ (!(g_ascii_strcasecmp(pv[2], "???") == 0 ||
+ g_ascii_strcasecmp(pv[3], "ERR") == 0 ||
+ g_ascii_strcasecmp(pv[4], "*") == 0))) {
sensors_applet_plugin_add_sensor(sensors,
pv[1], // must be dynamically allocated
pv[1], // must be dynamically allocated