Fix port->pathname checks

Was always true since it's statically allocated

RRR
Mike W9MDB
libusb-1-0
Michael Black 2016-02-06 00:59:15 -06:00 zatwierdzone przez Nate Bargmann
rodzic 732309e9d9
commit 61a0e77110
3 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -82,7 +82,7 @@ int cm108_open(hamlib_port_t *port)
rig_debug(RIG_DEBUG_VERBOSE,"cm108:cm108_open called \n");
if (!port->pathname)
if (!port->pathname[0])
return -RIG_EINVAL;
fd = open(port->pathname, O_RDWR);

Wyświetl plik

@ -141,7 +141,7 @@ int network_open(hamlib_port_t *rp, int default_port)
hints.ai_socktype = SOCK_STREAM;
hoststr = NULL; /* default of all local interfaces */
if (rp->pathname && rp->pathname[0] == ':')
if (rp->pathname[0] == ':')
{
portstr = rp->pathname + 1;
}

Wyświetl plik

@ -128,7 +128,7 @@ int par_open(hamlib_port_t *port)
int mode;
#endif
if (!port->pathname)
if (!port->pathname[0])
return -RIG_EINVAL;
#ifdef HAVE_LINUX_PPDEV_H