Fix macro in usb_port.c

pull/649/head
Michael Black W9MDB 2021-03-06 16:56:22 -06:00
rodzic 3cad5c9a30
commit f2586d0acb
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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)
{
static char pathname[FILPATHLEN];
static char pathname[HAMLIB_FILPATHLEN];
libusb_device_handle *udh;
char *p, *q;
int r;
@ -245,7 +245,7 @@ int usb_port_open(hamlib_port_t *port)
/* Extract VID/PID/Vendor/Product name from pathname. */
/* Duplicate the string since we may modify it. */
strncpy(pathname, port->pathname, sizeof pathname);
pathname[FILPATHLEN - 1] = '\0';
pathname[HAMLIB_FILPATHLEN - 1] = '\0';
p = pathname;
q = strchr(p, ':');