From 5e29d576c0c137a389a4d686c946a30a20eb40ff Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Tue, 18 Dec 2012 01:00:49 +0100 Subject: hddtemp-plugin: Fix string compare --- plugins/hddtemp/hddtemp-plugin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/hddtemp/hddtemp-plugin.c b/plugins/hddtemp/hddtemp-plugin.c index c7fde43..6822338 100644 --- a/plugins/hddtemp/hddtemp-plugin.c +++ b/plugins/hddtemp/hddtemp-plugin.c @@ -37,6 +37,7 @@ #endif #include +#include #include "hddtemp-plugin.h" const gchar *plugin_name = "hddtemp"; @@ -147,7 +148,7 @@ static void hddtemp_plugin_get_sensors(GList **sensors) { pv = output_vector = g_strsplit(hddtemp_output, "|", -1); while(pv[1] != NULL) { - if (pv[2] != "" && pv [3] != "" && pv[4] != "" && (!(g_ascii_strcasecmp(pv[2], "???") == 0 || g_ascii_strcasecmp(pv[3], "ERR") == 0 || g_ascii_strcasecmp(pv[4], "*") == 0))) { + 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))) { sensors_applet_plugin_add_sensor(sensors, pv[1], // must be dynamically allocated pv[1], // must be dynamically allocated -- cgit v1.2.1