Fix cppcheck warnings

pull/345/head
Michael Black W9MDB 2020-07-03 22:32:14 -05:00
rodzic 3d7ddc7e03
commit dee097366d
1 zmienionych plików z 8 dodań i 4 usunięć

Wyświetl plik

@ -106,15 +106,19 @@ static int netampctl_open(AMP *amp)
{ {
ret = read_string(&amp->state.ampport, buf, BUF_MAX, "\n", sizeof("\n")); ret = read_string(&amp->state.ampport, buf, BUF_MAX, "\n", sizeof("\n"));
if (ret <= 0) if (ret > 0)
{ {
return (ret < 0) ? ret : -RIG_EPROTO;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s called, string=%s\n", __func__, buf); rig_debug(RIG_DEBUG_VERBOSE, "%s called, string=%s\n", __func__, buf);
} }
}
while (ret > 0); while (ret > 0);
if (ret < 0)
{
return -RIG_EPROTO;
}
return RIG_OK; return RIG_OK;
} }