kopia lustrzana https://github.com/Hamlib/Hamlib
Fix cppcheck warnings
rodzic
a3bb987e23
commit
2e0c5f5687
|
@ -1382,7 +1382,7 @@ vfo_t HAMLIB_API vfo_fixup(RIG *rig, vfo_t vfo)
|
||||||
int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
|
int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
|
||||||
{
|
{
|
||||||
unsigned int net1, net2, net3, net4, net5, net6, net7, net8;
|
unsigned int net1, net2, net3, net4, net5, net6, net7, net8;
|
||||||
char dummy[2], link[32], *p;
|
char dummy[6], link[32], *p;
|
||||||
host[0] = 0;
|
host[0] = 0;
|
||||||
port[0] = 0;
|
port[0] = 0;
|
||||||
dummy[0] = 0;
|
dummy[0] = 0;
|
||||||
|
@ -1471,7 +1471,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sscanf(hoststr, ":%5[0-9]%s", port,
|
if (sscanf(hoststr, ":%5[0-9]%1s", port,
|
||||||
dummy) == 1) // just a port if you please
|
dummy) == 1) // just a port if you please
|
||||||
{
|
{
|
||||||
sprintf(hoststr, "%s:%s\n", "localhost", port);
|
sprintf(hoststr, "%s:%s\n", "localhost", port);
|
||||||
|
|
Ładowanie…
Reference in New Issue