Get rid of spurious messages from \dump_caps

rig_sprintf_func() outputs a RIG_DEBUG_ERR message for each
  function that the rig does not support.
pull/1765/head
George Baltz N3GB 2025-06-14 19:17:23 -04:00
rodzic bddd3ace00
commit 49e65de203
1 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -207,17 +207,20 @@ int rig_sprintf_func(char *str, int nlen, setting_t func)
{ {
const char *ms = rig_strfunc(func & rig_idx2setting(i)); const char *ms = rig_strfunc(func & rig_idx2setting(i));
if (!ms || !ms[0]) if (!ms)
{ {
rig_debug(RIG_DEBUG_ERR, "%s: unknown RIG_FUNC=%x\n", __func__, i); rig_debug(RIG_DEBUG_ERR, "%s: unknown RIG_FUNC=%x\n", __func__, i);
continue; /* unknown, FIXME! */ continue; /* unknown, FIXME! */
} }
if (ms[0])
{
strcat(str, ms); strcat(str, ms);
strcat(str, " "); strcat(str, " ");
len += strlen(ms) + 1; len += strlen(ms) + 1;
check_buffer_overflow(str, len, nlen); check_buffer_overflow(str, len, nlen);
} }
}
return len; return len;
} }