diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 69329150e..18ed4d3fa 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -3631,7 +3631,7 @@ int icom_get_split_vfos(const RIG *rig, vfo_t *rx_vfo, vfo_t *tx_vfo) */ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) { - int rc; + int retval; vfo_t rx_vfo, tx_vfo; struct icom_priv_data *priv; struct rig_state *rs; @@ -3658,7 +3658,7 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) if (priv->x25cmdfails == 0) { int satmode = 0; - rc = rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode); + retval = rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode); rig_debug(RIG_DEBUG_VERBOSE, "%s: satmode=%d\n", __func__, satmode); if (satmode == 0) // only worth trying if not in satmode @@ -3671,12 +3671,12 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) cmd = C_SEND_SEL_FREQ; subcmd = 0x01; // set the unselected vfo - rc = icom_transaction(rig, cmd, subcmd, freqbuf, freq_len, ackbuf, + retval = icom_transaction(rig, cmd, subcmd, freqbuf, freq_len, ackbuf, &ack_len); - if (rc == RIG_OK) // then we're done!! + if (retval == RIG_OK) // then we're done!! { - return rc; + return retval; } } @@ -3688,22 +3688,22 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) { rig_debug(RIG_DEBUG_TRACE, "%s: Using XCHG to swap/set/swap\n", __func__); - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_set_freq(rig, RIG_VFO_CURR, tx_freq))) + if (RIG_OK != (retval = icom_set_freq(rig, RIG_VFO_CURR, tx_freq))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - return rc; + return retval; } /* In the case of rigs with an A/B VFO arrangement we assume the @@ -3716,11 +3716,11 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) /* VFO A/B style rigs swap VFO on split Tx so we need to disable split for certainty */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_OFF, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } if (ack_len != 1 || ackbuf[0] != ACK) @@ -3731,22 +3731,22 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) } } - if (RIG_OK != (rc = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) + if (RIG_OK != (retval = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) { - return rc; + return retval; } rig_debug(RIG_DEBUG_TRACE, "%s: rx_vfo=%s, tx_vfo=%s\n", __func__, rig_strvfo(rx_vfo), rig_strvfo(tx_vfo)); - if (RIG_OK != (rc = icom_set_vfo(rig, tx_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, tx_vfo))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig_set_freq(rig, RIG_VFO_CURR, tx_freq))) + if (RIG_OK != (retval = rig_set_freq(rig, RIG_VFO_CURR, tx_freq))) { - return rc; + return retval; } if (VFO_HAS_MAIN_SUB_A_B_ONLY) @@ -3758,25 +3758,25 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) __func__, priv->split_on, rig_strvfo(save_vfo)); - if (RIG_OK != (rc = icom_set_vfo(rig, save_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, save_vfo))) { - return rc; + return retval; } } - else if (RIG_OK != (rc = icom_set_vfo(rig, rx_vfo))) + else if (RIG_OK != (retval = icom_set_vfo(rig, rx_vfo))) { - return rc; + return retval; } if (VFO_HAS_A_B_ONLY && priv->split_on) { /* Re-enable split */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_ON, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } } @@ -3790,7 +3790,7 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) priv->sub_freq = tx_freq; } - return rc; + return retval; } /* @@ -3800,7 +3800,7 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) */ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) { - int rc; + int retval; vfo_t rx_vfo, tx_vfo; struct icom_priv_data *priv; struct rig_state *rs; @@ -3828,7 +3828,7 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) if (priv->x25cmdfails == 0) { int satmode = 0; - rc = rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode); + retval = rig_get_func(rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, &satmode); rig_debug(RIG_DEBUG_VERBOSE, "%s: satmode=%d\n", __func__, satmode); if (satmode == 0) // only worth trying if not in satmode @@ -3837,13 +3837,13 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) { cmd = C_SEND_SEL_FREQ; subcmd = 0x01; // get the unselected vfo - rc = icom_transaction(rig, cmd, subcmd, NULL, 0, ackbuf, + retval = icom_transaction(rig, cmd, subcmd, NULL, 0, ackbuf, &ack_len); - if (rc == RIG_OK) // then we're done!! + if (retval == RIG_OK) // then we're done!! { *tx_freq = from_bcd(ackbuf + 2, (priv->civ_731_mode ? 4 : 5) * 2); - return rc; + return retval; } priv->x25cmdfails = 1; @@ -3855,13 +3855,13 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) { cmd = 0x1c; subcmd = 0x03; - rc = icom_transaction(rig, cmd, subcmd, NULL, 0, ackbuf, + retval = icom_transaction(rig, cmd, subcmd, NULL, 0, ackbuf, &ack_len); - if (rc == RIG_OK) // then we're done!! + if (retval == RIG_OK) // then we're done!! { *tx_freq = from_bcd(ackbuf, (priv->civ_731_mode ? 4 : 5) * 2); - return rc; + return retval; } priv->x1cx03cmdfails = 1; @@ -3875,22 +3875,22 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) /* This method works also in memory mode(RIG_VFO_MEM) */ if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG)) { - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_get_freq(rig, RIG_VFO_CURR, tx_freq))) + if (RIG_OK != (retval = icom_get_freq(rig, RIG_VFO_CURR, tx_freq))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - return rc; + return retval; } /* In the case of rigs with an A/B VFO arrangement we assume the @@ -3903,11 +3903,11 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) /* VFO A/B style rigs swap VFO on split Tx so we need to disable split for certainty */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_OFF, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } if (ack_len != 1 || ackbuf[0] != ACK) @@ -3918,19 +3918,19 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) } } - if (RIG_OK != (rc = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) + if (RIG_OK != (retval = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_set_vfo(rig, tx_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, tx_vfo))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_get_freq(rig, RIG_VFO_CURR, tx_freq))) + if (RIG_OK != (retval = icom_get_freq(rig, RIG_VFO_CURR, tx_freq))) { - return rc; + return retval; } if (VFO_HAS_MAIN_SUB_A_B_ONLY) @@ -3939,29 +3939,29 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) rig_debug(RIG_DEBUG_TRACE, "%s: SATMODE rig so returning vfo to %s\n", __func__, rig_strvfo(save_vfo)); - if (RIG_OK != (rc = icom_set_vfo(rig, save_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, save_vfo))) { - return rc; + return retval; } } - else if (RIG_OK != (rc = icom_set_vfo(rig, rx_vfo))) + else if (RIG_OK != (retval = icom_set_vfo(rig, rx_vfo))) { - return rc; + return retval; } if (VFO_HAS_A_B_ONLY && priv->split_on) { /* Re-enable split */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_ON, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } } - return rc; + return retval; } /* @@ -3972,7 +3972,7 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width) { - int rc; + int retval; vfo_t rx_vfo, tx_vfo; struct icom_priv_data *priv; struct rig_state *rs; @@ -3986,23 +3986,23 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, /* This method works also in memory mode(RIG_VFO_MEM) */ if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG)) { - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig->caps->set_mode(rig, RIG_VFO_CURR, tx_mode, + if (RIG_OK != (retval = rig->caps->set_mode(rig, RIG_VFO_CURR, tx_mode, tx_width))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - return rc; + return retval; } /* In the case of rigs with an A/B VFO arrangement we assume the @@ -4015,11 +4015,11 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, /* VFO A/B style rigs swap VFO on split Tx so we need to disable split for certainty */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_OFF, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } if (ack_len != 1 || ackbuf[0] != ACK) @@ -4030,40 +4030,40 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, } } - if (RIG_OK != (rc = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) + if (RIG_OK != (retval = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_set_vfo(rig, tx_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, tx_vfo))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig->caps->set_mode(rig, RIG_VFO_CURR, tx_mode, + if (RIG_OK != (retval = rig->caps->set_mode(rig, RIG_VFO_CURR, tx_mode, tx_width))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_set_vfo(rig, rx_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, rx_vfo))) { - return rc; + return retval; } if (VFO_HAS_A_B_ONLY && priv->split_on) { /* Re-enable split */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_ON, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } } - return rc; + return retval; } /* @@ -4075,7 +4075,7 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width) { - int rc; + int retval; vfo_t rx_vfo, tx_vfo; struct icom_priv_data *priv; struct rig_state *rs; @@ -4089,23 +4089,23 @@ int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, /* This method works also in memory mode(RIG_VFO_MEM) */ if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG)) { - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig->caps->get_mode(rig, RIG_VFO_CURR, tx_mode, + if (RIG_OK != (retval = rig->caps->get_mode(rig, RIG_VFO_CURR, tx_mode, tx_width))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - return rc; + return retval; } /* In the case of rigs with an A/B VFO arrangement we assume the @@ -4118,11 +4118,11 @@ int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, /* VFO A/B style rigs swap VFO on split Tx so we need to disable split for certainty */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_OFF, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } if (ack_len != 1 || ackbuf[0] != ACK) @@ -4133,40 +4133,40 @@ int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, } } - if (RIG_OK != (rc = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) + if (RIG_OK != (retval = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_set_vfo(rig, tx_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, tx_vfo))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig->caps->get_mode(rig, RIG_VFO_CURR, tx_mode, + if (RIG_OK != (retval = rig->caps->get_mode(rig, RIG_VFO_CURR, tx_mode, tx_width))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_set_vfo(rig, rx_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, rx_vfo))) { - return rc; + return retval; } if (VFO_HAS_A_B_ONLY && priv->split_on) { /* Re-enable split */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_ON, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } } - return rc; + return retval; } /* @@ -4177,7 +4177,7 @@ int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq, rmode_t tx_mode, pbwidth_t tx_width) { - int rc; + int retval; struct icom_priv_data *priv = (struct icom_priv_data *) rig->state.priv; unsigned char ackbuf[MAXFRAMELEN]; int ack_len = sizeof(ackbuf); @@ -4194,28 +4194,28 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq, /* This method works also in memory mode(RIG_VFO_MEM) */ if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG)) { - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig_set_freq(rig, RIG_VFO_CURR, tx_freq))) + if (RIG_OK != (retval = rig_set_freq(rig, RIG_VFO_CURR, tx_freq))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig->caps->set_mode(rig, RIG_VFO_CURR, tx_mode, + if (RIG_OK != (retval = rig->caps->set_mode(rig, RIG_VFO_CURR, tx_mode, tx_width))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - return rc; + return retval; } /* In the case of rigs with an A/B VFO arrangement we assume the @@ -4228,11 +4228,11 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq, /* VFO A/B style rigs swap VFO on split Tx so we need to disable split for certainty */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_OFF, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } if (ack_len != 1 || ackbuf[0] != ACK) @@ -4247,9 +4247,9 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq, "%s: before get_split_vfos rx_vfo=%s tx_vfo=%s\n", __func__, rig_strvfo(priv->rx_vfo), rig_strvfo(priv->tx_vfo)); - if (RIG_OK != (rc = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) + if (RIG_OK != (retval = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) { - return rc; + return retval; } rig_debug(RIG_DEBUG_VERBOSE, @@ -4257,40 +4257,40 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq, rig_strvfo(priv->rx_vfo), rig_strvfo(priv->tx_vfo)); - if (RIG_OK != (rc = icom_set_vfo(rig, tx_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, tx_vfo))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig_set_freq(rig, RIG_VFO_CURR, tx_freq))) + if (RIG_OK != (retval = rig_set_freq(rig, RIG_VFO_CURR, tx_freq))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig->caps->set_mode(rig, RIG_VFO_CURR, tx_mode, + if (RIG_OK != (retval = rig->caps->set_mode(rig, RIG_VFO_CURR, tx_mode, tx_width))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_set_vfo(rig, rx_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, rx_vfo))) { - return rc; + return retval; } if (VFO_HAS_A_B && priv->split_on) { /* Re-enable split */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_ON, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } } - return rc; + return retval; } /* @@ -4302,7 +4302,7 @@ int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq, int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq, rmode_t *tx_mode, pbwidth_t *tx_width) { - int rc; + int retval; vfo_t rx_vfo, tx_vfo; struct icom_priv_data *priv; struct rig_state *rs; @@ -4316,28 +4316,28 @@ int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq, /* This method works also in memory mode(RIG_VFO_MEM) */ if (!priv->no_xchg && rig_has_vfo_op(rig, RIG_OP_XCHG)) { - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig_get_freq(rig, RIG_VFO_CURR, tx_freq))) + if (RIG_OK != (retval = rig_get_freq(rig, RIG_VFO_CURR, tx_freq))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig->caps->get_mode(rig, RIG_VFO_CURR, tx_mode, + if (RIG_OK != (retval = rig->caps->get_mode(rig, RIG_VFO_CURR, tx_mode, tx_width))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) + if (RIG_OK != (retval = icom_vfo_op(rig, vfo, RIG_OP_XCHG))) { - return rc; + return retval; } - return rc; + return retval; } /* In the case of rigs with an A/B VFO arrangement we assume the @@ -4350,11 +4350,11 @@ int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq, /* VFO A/B style rigs swap VFO on split Tx so we need to disable split for certainty */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_OFF, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } if (ack_len != 1 || ackbuf[0] != ACK) @@ -4365,45 +4365,45 @@ int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq, } } - if (RIG_OK != (rc = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) + if (RIG_OK != (retval = icom_get_split_vfos(rig, &rx_vfo, &tx_vfo))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_set_vfo(rig, tx_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, tx_vfo))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_get_freq(rig, RIG_VFO_CURR, tx_freq))) + if (RIG_OK != (retval = icom_get_freq(rig, RIG_VFO_CURR, tx_freq))) { - return rc; + return retval; } - if (RIG_OK != (rc = rig->caps->get_mode(rig, RIG_VFO_CURR, tx_mode, + if (RIG_OK != (retval = rig->caps->get_mode(rig, RIG_VFO_CURR, tx_mode, tx_width))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_set_vfo(rig, rx_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, rx_vfo))) { - return rc; + return retval; } if (VFO_HAS_A_B_ONLY && priv->split_on) { /* Re-enable split */ if (RIG_OK != - (rc = + (retval = icom_transaction(rig, C_CTL_SPLT, S_SPLT_ON, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } } - return rc; + return retval; } @@ -4415,7 +4415,7 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) { struct icom_priv_data *priv = (struct icom_priv_data *) rig->state.priv; unsigned char ackbuf[MAXFRAMELEN]; - int ack_len = sizeof(ackbuf), rc; + int ack_len = sizeof(ackbuf), retval; int split_sc; vfo_t vfo_final = RIG_VFO_NONE; // where does the VFO end up? @@ -4507,14 +4507,14 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) #if 0 // is this needed for satmode? // make sure we're on Main/VFOA - if (RIG_OK != (rc = icom_set_vfo(rig, RIG_VFO_MAIN))) + if (RIG_OK != (retval = icom_set_vfo(rig, RIG_VFO_MAIN))) { - return rc; + return retval; } - if (RIG_OK != (rc = icom_set_vfo(rig, RIG_VFO_A))) + if (RIG_OK != (retval = icom_set_vfo(rig, RIG_VFO_A))) { - return rc; + return retval; } #endif @@ -4527,9 +4527,9 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) #if 0 // do we need this for satmode? - if (RIG_OK != (rc = icom_set_vfo(rig, tx_vfo))) + if (RIG_OK != (retval = icom_set_vfo(rig, tx_vfo))) { - return rc; + return retval; } #endif @@ -4554,10 +4554,10 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) return -RIG_EINVAL; } - if (RIG_OK != (rc = icom_transaction(rig, C_CTL_SPLT, split_sc, NULL, 0, + if (RIG_OK != (retval = icom_transaction(rig, C_CTL_SPLT, split_sc, NULL, 0, ackbuf, &ack_len))) { - return rc; + return retval; } if (ack_len != 1 || ackbuf[0] != ACK) @@ -4573,12 +4573,12 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) { rig_debug(RIG_DEBUG_TRACE, "%s: vfo_final set %s\n", __func__, rig_strvfo(vfo_final)); - rc = rig_set_vfo(rig, vfo_final); + retval = rig_set_vfo(rig, vfo_final); - if (rc != RIG_OK) + if (retval != RIG_OK) { rig_debug(RIG_DEBUG_TRACE, "%s: vfo_final set failed? err=%s\n", __func__, - rigerror(rc)); + rigerror(retval)); } } @@ -5548,7 +5548,7 @@ int icom_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code) return -RIG_EINVAL; } - /* DCS Polarity ignored, by setting code_len to 3 it's forced to 0 (= Tx:norm, Rx:norm). */ + /* DCS Polarity ignored, by setting code_len to 3 it's foretval to 0 (= Tx:norm, Rx:norm). */ code_len = 3; to_bcd_be(codebuf, code, code_len * 2);