From 68e6dd0e21aa872883655c2e677e1fc9193a8b3f Mon Sep 17 00:00:00 2001 From: hiteki Date: Sun, 21 Jun 2020 16:09:45 +0200 Subject: [PATCH] Correctly compare response strings #319 --- rigs/uniden/uniden.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rigs/uniden/uniden.c b/rigs/uniden/uniden.c index 8117de7ad..b79fac041 100644 --- a/rigs/uniden/uniden.c +++ b/rigs/uniden/uniden.c @@ -187,7 +187,7 @@ transaction_write: goto transaction_quit; } - if (strcmp(data, "OK"EOM)) + if (strcmp(data, "OK"EOM) == 0) { /* everything is fine */ retval = RIG_OK; @@ -198,7 +198,7 @@ transaction_write: * in the right mode or using the correct parameters. ERR indicates * an INVALID Command. */ - if (strcmp(data, "NG"EOM) || strcmp(data, "ORER"EOM)) + if (strcmp(data, "NG"EOM) == 0 || strcmp(data, "ORER"EOM) == 0) { /* Invalid command */ rig_debug(RIG_DEBUG_VERBOSE, "%s: NG/Overflow for '%s'\n", __func__, cmdstr); @@ -206,7 +206,7 @@ transaction_write: goto transaction_quit; } - if (strcmp(data, "ERR"EOM)) + if (strcmp(data, "ERR"EOM) == 0) { /* Command format error */ rig_debug(RIG_DEBUG_VERBOSE, "%s: Error for '%s'\n", __func__, cmdstr);