kopia lustrzana https://github.com/Hamlib/Hamlib
Fix port->pathname checks
Was always true since it's statically allocated RRR Mike W9MDBlibusb-1-0
rodzic
732309e9d9
commit
61a0e77110
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue