From a4c08f4aa8e42c9ce60d49f40802d912ca915f47 Mon Sep 17 00:00:00 2001 From: Alex Murray Date: Tue, 30 Jun 2015 01:38:52 +0200 Subject: Fix up string check errors --- plugins/hddtemp/hddtemp-plugin.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins') 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 -- cgit v1.2.1