Windows: Remove redundant check in windows_claim_interface()
authorChris Dickens <christopher.a.dickens@gmail.com>
Wed, 29 Jul 2015 05:38:10 +0000 (22:38 -0700)
committerChris Dickens <christopher.a.dickens@gmail.com>
Wed, 29 Jul 2015 06:10:23 +0000 (23:10 -0700)
* Checking of this parameter is already done by the core
* Closes #77

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/windows_usb.c
libusb/version_nano.h

index 01a4844..734c47e 100644 (file)
@@ -2014,9 +2014,6 @@ static int windows_claim_interface(struct libusb_device_handle *dev_handle, int
        int r = LIBUSB_SUCCESS;
        struct windows_device_priv *priv = _device_priv(dev_handle->dev);
 
-       if (iface >= USB_MAXINTERFACES)
-               return LIBUSB_ERROR_INVALID_PARAM;
-
        safe_free(priv->usb_interface[iface].endpoint);
        priv->usb_interface[iface].nb_endpoints= 0;
 
index 1ac5e98..1135a18 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 10986
+#define LIBUSB_NANO 10987