summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAlex Murray <[email protected]>2015-06-30 01:38:52 +0200
committerinfirit <[email protected]>2015-07-07 15:36:36 +0200
commita4c08f4aa8e42c9ce60d49f40802d912ca915f47 (patch)
tree2ca7eda34e76b2f3d3301f2cd50a2f916457ab87 /plugins
parent0bca8af943eec18ef3efca5adedec85c069af045 (diff)
downloadmate-sensors-applet-a4c08f4aa8e42c9ce60d49f40802d912ca915f47.tar.bz2
mate-sensors-applet-a4c08f4aa8e42c9ce60d49f40802d912ca915f47.tar.xz
Fix up string check errors
Diffstat (limited to 'plugins')
-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