From 52703c35d5f011ef006a1e13c7f53d3bf4d29e33 Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Sun, 28 Feb 2021 12:37:54 -0600 Subject: [PATCH] Fix cppcheck warning in rig.c --- src/rig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rig.c b/src/rig.c index 6114b505b..74a06bdf7 100644 --- a/src/rig.c +++ b/src/rig.c @@ -3834,19 +3834,19 @@ int HAMLIB_API rig_set_split_freq_mode(RIG *rig, caps = rig->caps; - int retry = 3; if (caps->set_split_freq_mode) { freq_t tfreq; - + int retry = 3; + int retcode2; // we query freq after set to ensure it really gets done do { retcode = caps->set_split_freq_mode(rig, vfo, tx_freq, tx_mode, tx_width); - retcode = rig_get_split_freq(rig, vfo, &tfreq); + retcode2 = rig_get_split_freq(rig, vfo, &tfreq); } - while (tfreq != tx_freq && retry-- > 0 && retcode == RIG_OK); + while (tfreq != tx_freq && retry-- > 0 && retcode == RIG_OK && retcode2 == RIG_OK); if (tfreq != tx_freq) { retcode = -RIG_EPROTO; }