mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Initialize uninitialized variable
This fixes a potentially undefined branch if the USB device list is empty. dev is NULL, the loop is never entered, 'r' isn't set. if (!dev && !r) is undefined.
This commit is contained in:
parent
e9e761565b
commit
df60eca33c
1 changed files with 1 additions and 1 deletions
|
|
@ -260,7 +260,7 @@ get_usb_device (uint16_t vendor_id, uint16_t product_id, libusb_device** device)
|
|||
struct libusb_device **devs;
|
||||
struct libusb_device *dev;
|
||||
size_t i = 0;
|
||||
int r;
|
||||
int r = LIBUSB_ERROR_NO_DEVICE;
|
||||
|
||||
*device = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue