kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
53855c868d
commit
e1e7112cb5
|
@ -466,7 +466,7 @@ int HAMLIB_API amp_close(AMP *amp)
|
|||
|
||||
amp_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
|
||||
|
||||
if (!amp || !amp->caps)
|
||||
if (amp == NULL || amp->caps == NULL)
|
||||
{
|
||||
amp_debug(RIG_DEBUG_ERR, "%s: NULL ptr? amp=%p, amp->caps=%p\n", __func__, amp,
|
||||
amp->caps);
|
||||
|
|
|
@ -1307,7 +1307,7 @@ static int read_string_generic(hamlib_port_t *p,
|
|||
int i = 0;
|
||||
static int minlen = 1; // dynamic minimum length of rig response data
|
||||
|
||||
if (!p->asyncio && !direct)
|
||||
if (p != NULL && !p->asyncio && !direct)
|
||||
{
|
||||
return -RIG_EINTERNAL;
|
||||
}
|
||||
|
@ -1461,7 +1461,7 @@ static int read_string_generic(hamlib_port_t *p,
|
|||
|
||||
if (total_count > 1 && rxbuffer[0] == ';')
|
||||
{
|
||||
while (rxbuffer[0] == ';' && rxbuffer[0] != 0 && total_count > 1)
|
||||
while (rxbuffer[0] == ';' && total_count > 1)
|
||||
{
|
||||
memmove(rxbuffer, &rxbuffer[1], strlen((char *)rxbuffer) - 1);
|
||||
--total_count;
|
||||
|
|
Ładowanie…
Reference in New Issue