kopia lustrzana https://github.com/Hamlib/Hamlib
Fix cppcheck warnings
rodzic
6a4e31f890
commit
d48d12c972
|
@ -812,7 +812,7 @@ static int netrigctl_open(RIG *rig)
|
||||||
{
|
{
|
||||||
int agc_code;
|
int agc_code;
|
||||||
char agc_string[32];
|
char agc_string[32];
|
||||||
int n = sscanf(p, "%d=%s\n", &agc_code, agc_string);
|
int n = sscanf(p, "%d=%31s\n", &agc_code, agc_string);
|
||||||
|
|
||||||
if (n == 2)
|
if (n == 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -753,7 +753,7 @@ static int quisk_open(RIG *rig)
|
||||||
{
|
{
|
||||||
int agc_code;
|
int agc_code;
|
||||||
char agc_string[32];
|
char agc_string[32];
|
||||||
int n = sscanf(p, "%d=%s\n", &agc_code, agc_string);
|
int n = sscanf(p, "%d=%31s\n", &agc_code, agc_string);
|
||||||
|
|
||||||
if (n == 2)
|
if (n == 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -173,11 +173,7 @@ static int dummy_rot_cleanup(ROT *rot)
|
||||||
free(priv->ext_levels);
|
free(priv->ext_levels);
|
||||||
free(priv->ext_parms);
|
free(priv->ext_parms);
|
||||||
free(priv->magic_conf);
|
free(priv->magic_conf);
|
||||||
|
|
||||||
if (rot->state.priv)
|
|
||||||
{
|
|
||||||
free(rot->state.priv);
|
free(rot->state.priv);
|
||||||
}
|
|
||||||
|
|
||||||
rot->state.priv = NULL;
|
rot->state.priv = NULL;
|
||||||
|
|
||||||
|
|
|
@ -622,7 +622,7 @@ static int tci1x_open(RIG *rig)
|
||||||
// we fall through and assume old version
|
// we fall through and assume old version
|
||||||
}
|
}
|
||||||
|
|
||||||
sscanf(&value[2], "device:%s", value);
|
sscanf(&value[2], "device:%8191s", value);
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: TCI Device is %s\n", __func__, arg);
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: TCI Device is %s\n", __func__, arg);
|
||||||
|
|
||||||
|
@ -635,8 +635,8 @@ static int tci1x_open(RIG *rig)
|
||||||
rigerror(retval));
|
rigerror(retval));
|
||||||
}
|
}
|
||||||
|
|
||||||
sscanf(&value[2], "receive_only:%s", value);
|
sscanf(&value[2], "receive_only:%8191s", value);
|
||||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: readonly is %s\n", __func__, arg);
|
rig_debug(RIG_DEBUG_VERBOSE, "%s: readonly is %8191s\n", __func__, arg);
|
||||||
|
|
||||||
// TRX count
|
// TRX count
|
||||||
retval = tci1x_transaction(rig, "trx_count;", NULL, value, sizeof(value));
|
retval = tci1x_transaction(rig, "trx_count;", NULL, value, sizeof(value));
|
||||||
|
@ -820,7 +820,7 @@ static int tci1x_cleanup(RIG *rig)
|
||||||
|
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
|
|
||||||
if (!rig)
|
if (rig == NULL)
|
||||||
{
|
{
|
||||||
RETURNFUNC(-RIG_EINVAL);
|
RETURNFUNC(-RIG_EINVAL);
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue