Fix cppcheck warnings in rigmem.c

pull/155/head
Michael Black 2019-12-08 23:42:32 -06:00
rodzic 0207b45ff8
commit ddd5c43a71
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
1 zmienionych plików z 4 dodań i 5 usunięć

Wyświetl plik

@ -421,15 +421,14 @@ void usage()
int set_conf(RIG *rig, char *conf_parms) int set_conf(RIG *rig, char *conf_parms)
{ {
char *p, *q, *n; char *p, *n;
int ret;
p = conf_parms; p = conf_parms;
while (p && *p != '\0') while (p && *p != '\0')
{ {
/* FIXME: left hand value of = cannot be null */ /* FIXME: left hand value of = cannot be null */
q = strchr(p, '='); char *q = strchr(p, '=');
if (!q) if (!q)
{ {
@ -444,7 +443,7 @@ int set_conf(RIG *rig, char *conf_parms)
*n++ = '\0'; *n++ = '\0';
} }
ret = rig_set_conf(rig, rig_token_lookup(rig, p), q); int ret = rig_set_conf(rig, rig_token_lookup(rig, p), q);
if (ret != RIG_OK) if (ret != RIG_OK)
{ {
@ -473,7 +472,7 @@ int clear_chans(RIG *rig, const char *infilename)
chan.tx_mode = RIG_MODE_NONE; chan.tx_mode = RIG_MODE_NONE;
chan.vfo = RIG_VFO_MEM; chan.vfo = RIG_VFO_MEM;
for (i = 0; rig->state.chan_list[i].type && i < CHANLSTSIZ; i++) for (i = 0; rig->state.chan_list[i].type; i++)
{ {
for (j = rig->state.chan_list[i].startc; for (j = rig->state.chan_list[i].startc;
j <= rig->state.chan_list[i].endc; j++) j <= rig->state.chan_list[i].endc; j++)