Fix cppcheck warning in rigsmtr.c

pull/155/head
Michael Black 2019-12-23 23:13:40 -06:00
rodzic 475012771b
commit 17fb84044f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
1 zmienionych plików z 11 dodań i 9 usunięć

Wyświetl plik

@ -428,20 +428,20 @@ void usage()
int set_conf_rig(RIG *rig, char *conf_parms)
{
char *p, *q, *n;
char *p;
int ret;
p = conf_parms;
while (p && *p != '\0')
{
char *q, *n = NULL;
/* FIXME: left hand value of = cannot be null */
q = strchr(p, '=');
if (!q)
{
return RIG_EINVAL;
}
*q++ = '\0';
n = strchr(q, ',');
@ -450,6 +450,7 @@ int set_conf_rig(RIG *rig, char *conf_parms)
{
*n++ = '\0';
}
}
ret = rig_set_conf(rig, rig_token_lookup(rig, p), q);
@ -467,13 +468,14 @@ int set_conf_rig(RIG *rig, char *conf_parms)
int set_conf_rot(ROT *rot, char *conf_parms)
{
char *p, *q, *n = NULL;
int ret;
char *p;
p = conf_parms;
while (p && *p != '\0')
{
char *q, *n = NULL;
int ret;
/* FIXME: left hand value of = cannot be null */
q = strchr(p, '=');