Fix cppcheck warnings in ft757gx.c

pull/168/head
Michael Black 2020-01-07 23:24:10 -06:00
rodzic 7ee3a702f5
commit 6cee328283
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
1 zmienionych plików z 3 dodań i 34 usunięć

Wyświetl plik

@ -381,7 +381,6 @@ int ft757_cleanup(RIG *rig)
int ft757_open(RIG *rig)
{
struct ft757_priv_data *priv = (struct ft757_priv_data *)rig->state.priv;
int retval;
rig_debug(RIG_DEBUG_VERBOSE, "%s called.\n", __func__);
@ -393,7 +392,7 @@ int ft757_open(RIG *rig)
else
{
/* read back the 75 status bytes from FT757GXII */
retval = ft757_get_update_data(rig);
int retval = ft757_get_update_data(rig);
if (retval < 0)
{
@ -419,11 +418,6 @@ int ft757_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
rig_debug(RIG_DEBUG_VERBOSE, "%s called. Freq=%"PRIfreq"\n", __func__, freq);
if (!rig)
{
return -RIG_EINVAL;
}
/* fill in first four bytes */
to_bcd(cmd, freq / 10, BCD_LEN);
@ -482,11 +476,6 @@ int ft757_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
rig_debug(RIG_DEBUG_VERBOSE, "%s called.\n", __func__);
if (!rig)
{
return -RIG_EINVAL;
}
retval = ft757_get_update_data(rig); /* get whole shebang from rig */
if (retval < 0)
@ -526,11 +515,6 @@ int ft757_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
rig_debug(RIG_DEBUG_VERBOSE, "%s called.\n", __func__);
if (!rig)
{
return -RIG_EINVAL;
}
retval = ft757_get_update_data(rig); /* get whole shebang from rig */
if (retval < 0)
@ -573,11 +557,6 @@ int ft757_set_vfo(RIG *rig, vfo_t vfo)
rig_debug(RIG_DEBUG_VERBOSE, "%s called.\n", __func__);
if (!rig)
{
return -RIG_EINVAL;
}
switch (vfo)
{
case RIG_VFO_CURR:
@ -608,11 +587,6 @@ int ft757_get_vfo(RIG *rig, vfo_t *vfo)
rig_debug(RIG_DEBUG_VERBOSE, "%s called.\n", __func__);
if (!rig)
{
return -RIG_EINVAL;
}
retval = ft757_get_update_data(rig); /* get whole shebang from rig */
if (retval < 0)
@ -644,11 +618,6 @@ int ft757_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
rig_debug(RIG_DEBUG_VERBOSE, "%s called.\n", __func__);
if (!rig)
{
return -RIG_EINVAL;
}
retval = ft757_get_update_data(rig); /* get whole shebang from rig */
if (retval < 0)
@ -656,7 +625,7 @@ int ft757_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
return retval;
}
*ptt = priv->update_data[0] & 0x20 ? RIG_PTT_ON : RIG_PTT_OFF;
*ptt = (priv->update_data[0] & 0x20) ? RIG_PTT_ON : RIG_PTT_OFF;
return RIG_OK;
}
@ -895,7 +864,7 @@ int ft757gx_get_conf(RIG *rig, token_t token, char *val)
break;
default:
val = NULL;
*val = 0;
return -RIG_EINVAL;
}