mirror of
git://projects.qi-hardware.com/f32xbase.git
synced 2024-11-04 23:52:50 +02:00
lib/usb.c (open_usb): Stupid beginner's mistake: wrong operator precedence due
to missing parentheses in device selection caused it to just pick the first device it found.
This commit is contained in:
parent
5ce904b20f
commit
79396b1777
@ -38,10 +38,10 @@ usb_dev_handle *open_usb(uint16_t default_vendor, uint16_t default_product)
|
||||
for (bus = usb_get_busses(); bus; bus = bus->next)
|
||||
for (dev = bus->devices; dev; dev = dev->next) {
|
||||
if (dev->descriptor.idVendor !=
|
||||
vendor ? vendor : default_vendor)
|
||||
(vendor ? vendor : default_vendor))
|
||||
continue;
|
||||
if (dev->descriptor.idProduct !=
|
||||
product ? product : default_product)
|
||||
(product ? product : default_product))
|
||||
continue;
|
||||
handle = usb_open(dev);
|
||||
#ifdef DO_FULL_USB_BUREAUCRACY
|
||||
|
Loading…
Reference in New Issue
Block a user