kopia lustrzana https://github.com/Hamlib/Hamlib
Fix macro in usb_port.c
rodzic
3cad5c9a30
commit
f2586d0acb
|
@ -220,7 +220,7 @@ static libusb_device_handle *find_and_open_device(const hamlib_port_t *port)
|
||||||
*/
|
*/
|
||||||
int usb_port_open(hamlib_port_t *port)
|
int usb_port_open(hamlib_port_t *port)
|
||||||
{
|
{
|
||||||
static char pathname[FILPATHLEN];
|
static char pathname[HAMLIB_FILPATHLEN];
|
||||||
libusb_device_handle *udh;
|
libusb_device_handle *udh;
|
||||||
char *p, *q;
|
char *p, *q;
|
||||||
int r;
|
int r;
|
||||||
|
@ -245,7 +245,7 @@ int usb_port_open(hamlib_port_t *port)
|
||||||
/* Extract VID/PID/Vendor/Product name from pathname. */
|
/* Extract VID/PID/Vendor/Product name from pathname. */
|
||||||
/* Duplicate the string since we may modify it. */
|
/* Duplicate the string since we may modify it. */
|
||||||
strncpy(pathname, port->pathname, sizeof pathname);
|
strncpy(pathname, port->pathname, sizeof pathname);
|
||||||
pathname[FILPATHLEN - 1] = '\0';
|
pathname[HAMLIB_FILPATHLEN - 1] = '\0';
|
||||||
|
|
||||||
p = pathname;
|
p = pathname;
|
||||||
q = strchr(p, ':');
|
q = strchr(p, ':');
|
||||||
|
|
Ładowanie…
Reference in New Issue