Merge pull request #771 from wutje/width_removal

Width pointer check removal
pull/775/head
Michael Black 2021-08-21 15:59:59 -05:00 zatwierdzone przez GitHub
commit 6d5eb2052e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 58 dodań i 64 usunięć

Wyświetl plik

@ -2220,8 +2220,6 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
// if we already set width we won't update with except during set_vfo or set_mode
// reason is we can't get width without swapping vfos -- yuck!!
if (width != NULL)
{
if (vfo & (RIG_VFO_A | RIG_VFO_MAIN | RIG_VFO_SUB_A | RIG_VFO_MAIN_A |
RIG_VFO_CURR))
{
@ -2279,7 +2277,6 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
rig_strvfo(vfo), rig_strvfo(vfosave));
}
}
}
RETURNFUNC(RIG_OK);

Wyświetl plik

@ -467,10 +467,7 @@ int ft600_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
return -RIG_EINVAL;
}
if (width != NULL)
{
*width = RIG_PASSBAND_NORMAL;
}
ret = ft600_read_status(rig);

Wyświetl plik

@ -10080,16 +10080,13 @@ rmode_t newcat_rmode_width(RIG *rig, vfo_t vfo, char mode, pbwidth_t *width)
ENTERFUNC;
if (width != NULL)
{
*width = RIG_PASSBAND_NORMAL;
}
for (i = 0; i < sizeof(newcat_mode_conv) / sizeof(newcat_mode_conv[0]); i++)
{
if (newcat_mode_conv[i].modechar == mode)
{
if (newcat_mode_conv[i].chk_width == TRUE && width != NULL)
if (newcat_mode_conv[i].chk_width == TRUE)
{
if (newcat_is_rig(rig, RIG_MODEL_FT991)
&& mode == 'E') // crude fix because 991 hangs on NA0; command while in C4FM

Wyświetl plik

@ -2297,6 +2297,9 @@ int HAMLIB_API rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
* The value stored at \a mode location equals RIG_MODE_NONE when the current
* mode of the VFO is not defined (e.g. blank memory).
*
* Note that if either \a mode or \a width is NULL, -RIG_EINVAL is returned.
* Both must be given even if only one is actually wanted.
*
* \RETURNFUNC(RIG_OK) if the operation has been successful, otherwise
* a negative value if an error occurred (in which case, cause is
* set appropriately).