Fix ENTERFUNC/RETURNFUNC imbalances found by repaired func_chk

This commit is contained in:
George Baltz N3GB 2024-06-26 16:44:04 -04:00
parent 6996a1222c
commit 0790f4d72e
7 changed files with 26 additions and 26 deletions

View File

@ -435,7 +435,7 @@ static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (rig == NULL)
{
rig_debug(RIG_DEBUG_ERR, "%s: rig is NULL!!!\n", __func__);
return -RIG_EINVAL;
RETURNFUNC(-RIG_EINVAL);
}
priv = (struct dummy_priv_data *)STATE(rig)->priv;

View File

@ -2134,12 +2134,12 @@ int icom_set_dsp_flt(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (priv->no_1a_03_cmd == ENUM_1A_03_UNK)
{
priv->no_1a_03_cmd = ENUM_1A_03_NO; /* do not keep asking */
return (RIG_OK);
RETURNFUNC(RIG_OK);
}
else
{
rig_debug(RIG_DEBUG_ERR, "%s: 1A 03 %02x failed\n", __func__, flt_ext);
return (retval);
RETURNFUNC(retval);
}
}
@ -5219,7 +5219,7 @@ int icom_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
{
RETURNFUNC2(retval);
RETURNFUNC(retval);
}
RETURNFUNC(RIG_OK);
@ -5347,7 +5347,7 @@ int icom_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
{
RETURNFUNC2(retval);
RETURNFUNC(retval);
}
RETURNFUNC(RIG_OK);
@ -5446,7 +5446,7 @@ int icom_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
{
RETURNFUNC2(retval);
RETURNFUNC(retval);
}
RETURNFUNC(RIG_OK);
@ -7549,7 +7549,7 @@ int icom_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
{
RETURNFUNC2(retval);
RETURNFUNC(retval);
}
RETURNFUNC(RIG_OK);
@ -7740,7 +7740,7 @@ int icom_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
{
RETURNFUNC2(retval);
RETURNFUNC(retval);
}
RETURNFUNC(RIG_OK);
@ -7837,7 +7837,7 @@ int icom_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
{
RETURNFUNC2(retval);
RETURNFUNC(retval);
}
RETURNFUNC(RIG_OK);
@ -8248,7 +8248,7 @@ int icom_set_bank(RIG *rig, vfo_t vfo, int bank)
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
{
RETURNFUNC2(retval);
RETURNFUNC(retval);
}
RETURNFUNC(RIG_OK);
@ -8671,7 +8671,7 @@ int icom_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
if ((retval = icom_check_ack(ack_len, ackbuf)) != RIG_OK)
{
RETURNFUNC2(retval);
RETURNFUNC(retval);
}
RETURNFUNC(RIG_OK);
@ -8719,7 +8719,7 @@ morse_retry:
}
}
RETURNFUNC2(retval);
RETURNFUNC(retval);
}
RETURNFUNC(RIG_OK);

View File

@ -620,7 +620,7 @@ static int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
}
val->f = levelint / (float) 255;
return RIG_OK;
RETURNFUNC(RIG_OK);
case RIG_LEVEL_SQL:
SNPRINTF(cmdbuf, sizeof(cmdbuf), "SQ%c", vfo_num);

View File

@ -742,7 +742,7 @@ kenwood_ts480_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
}
default:
return kenwood_get_level(rig, vfo, level, val);
RETURNFUNC(kenwood_get_level(rig, vfo, level, val));
}
RETURNFUNC(RIG_OK);

View File

@ -610,7 +610,7 @@ static int ts590_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported agc value", __func__);
return -RIG_EINVAL;
RETURNFUNC(-RIG_EINVAL);
}
SNPRINTF(levelbuf, sizeof(levelbuf), "GT%02d", kenwood_val);
@ -1004,7 +1004,7 @@ static int ts590_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
default:
return -RIG_ENAVAIL;
RETURNFUNC(-RIG_ENAVAIL);
}
break;

View File

@ -170,7 +170,7 @@ static int micom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
write_block(rp, ack, sizeof(ack));
set_transaction_inactive(rig);
*freq = (reply[4] << 24) | (reply[5] << 16) | (reply[6] << 8) | reply[7];
RETURNFUNC(RIG_OK);
RETURNFUNC2(RIG_OK);
}
static int micom_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)

View File

@ -1037,12 +1037,12 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
__func__, rig_strvfo(vfo), rig_strvfo(rig_s->tx_vfo));
// when in split we can change VFOB but not VFOA
if (cachep->split == RIG_SPLIT_ON && target_vfo == '0') { return -RIG_ENTARGET; }
if (cachep->split == RIG_SPLIT_ON && target_vfo == '0') { RETURNFUNC(-RIG_ENTARGET); }
// when not in split we can't change VFOA at all
if (cachep->split == RIG_SPLIT_OFF && target_vfo == '0') { return -RIG_ENTARGET; }
if (cachep->split == RIG_SPLIT_OFF && target_vfo == '0') { RETURNFUNC(-RIG_ENTARGET); }
if (vfo != rig_s->tx_vfo) { return -RIG_ENTARGET; }
if (vfo != rig_s->tx_vfo) { RETURNFUNC(-RIG_ENTARGET); }
}
if (is_ftdx3000 || is_ftdx3000dm || is_ftdx5000 || is_ftdx1200)
@ -1069,7 +1069,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
}
while (err == RIG_OK && ptt == RIG_PTT_ON && retry-- > 0);
if (ptt) { return -RIG_ENTARGET; }
if (ptt) { RETURNFUNC(-RIG_ENTARGET); }
}
if (RIG_MODEL_FT450 == caps->rig_model)
@ -5129,7 +5129,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig cannot read MG in CW/RTTY modes\n",
__func__);
return RIG_OK;
RETURNFUNC(RIG_OK);
}
if (is_ft991 || is_ft710 || is_ftdx3000 || is_ftdx3000dm || is_ftdx5000
@ -6961,7 +6961,7 @@ int newcat_set_parm(RIG *rig, setting_t parm, value_t val)
default:
rig_debug(RIG_DEBUG_ERR, "%s: Unknown band %s=%d\n", __func__, val.s, rigband);
return -RIG_EINVAL;
RETURNFUNC(-RIG_EINVAL);
}
SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c", band, cat_term);
@ -7646,7 +7646,7 @@ int newcat_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
ENTERFUNC;
if (scan != RIG_SCAN_VFO) { RETURNFUNC2(-RIG_EINVAL); }
if (scan != RIG_SCAN_VFO) { RETURNFUNC(-RIG_EINVAL); }
SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "SC%d%c",
scan == RIG_SCAN_STOP ? 0 : ch, cat_term);
@ -7655,10 +7655,10 @@ int newcat_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s:%d command err = %d\n", __func__, __LINE__,
retval);
RETURNFUNC2(retval);
RETURNFUNC(retval);
}
RETURNFUNC2(retval);
RETURNFUNC(retval);
}