]> err.no Git - yubikey-personalization/commitdiff
Reduced the scope of dev
authorAntti Keränen <detegr@gmail.com>
Mon, 3 Mar 2014 12:48:23 +0000 (14:48 +0200)
committerAntti Keränen <detegr@gmail.com>
Mon, 3 Mar 2014 12:48:23 +0000 (14:48 +0200)
ykcore/ykcore_libusb.c

index e98e8d82fcd0a578e7db86891e9735b6448ff132..fc22eaa0b58a637bbcda90f7f7e53ee5e45d66a3 100644 (file)
@@ -151,12 +151,13 @@ extern int _ykusb_stop(void)
 void *_ykusb_open_device(int vendor_id, int *product_ids, size_t pids_len)
 {
        struct usb_bus *bus;
-       struct usb_device *dev, *yk_device;
+       struct usb_device *yk_device;
        struct usb_dev_handle *h = NULL;
        int rc = YK_EUSBERR;
        int found = 0;
 
        for (bus = usb_get_busses(); bus; bus = bus->next) {
+               struct usb_device *dev;
                rc = YK_ENOKEY;
                for (dev = bus->devices; dev; dev = dev->next) {
                        if (dev->descriptor.idVendor == vendor_id) {