From e777db10ec1441b5aa3573df2957949af602a07b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Antti=20Ker=C3=A4nen?= Date: Mon, 3 Mar 2014 14:48:23 +0200 Subject: [PATCH] Reduced the scope of dev --- ykcore/ykcore_libusb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ykcore/ykcore_libusb.c b/ykcore/ykcore_libusb.c index e98e8d8..fc22eaa 100644 --- a/ykcore/ykcore_libusb.c +++ b/ykcore/ykcore_libusb.c @@ -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) { -- 2.39.5