diff options
-rw-r--r-- | plugins/hddtemp/hddtemp-plugin.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <unistd.h> +#include <glib.h> #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 |