Skip to content

Commit

Permalink
Fixed issue claiming interface of a device on Windows by removing an
Browse files Browse the repository at this point in the history
errorneous "!" from an if statement.
  • Loading branch information
Benjamin-Dobell committed Feb 1, 2013
1 parent 6a445e6 commit 88eed06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libusb/os/windows_usb.c
Expand Up @@ -2732,11 +2732,11 @@ static int winusbx_claim_interface(int sub_api, struct libusb_device_handle *dev
// must first claim the first interface before you claim the others // must first claim the first interface before you claim the others
if ((winusb_handle == 0) || (winusb_handle == INVALID_HANDLE_VALUE)) { if ((winusb_handle == 0) || (winusb_handle == INVALID_HANDLE_VALUE)) {
file_handle = handle_priv->interface_handle[0].dev_handle; file_handle = handle_priv->interface_handle[0].dev_handle;
if (!WinUSBX[sub_api].Initialize(file_handle, &winusb_handle)) { if (WinUSBX[sub_api].Initialize(file_handle, &winusb_handle)) {
handle_priv->interface_handle[0].api_handle = winusb_handle; handle_priv->interface_handle[0].api_handle = winusb_handle;
usbi_warn(ctx, "auto-claimed interface 0 (required to claim %d with WinUSB)", iface); usbi_warn(ctx, "auto-claimed interface 0 (required to claim %d with WinUSB)", iface);
} else { } else {
usbi_warn(ctx, "failed to auto-claim interface 0 (required to claim %d with WinUSB)", iface); usbi_warn(ctx, "failed to auto-claim interface 0 (required to claim %d with WinUSB): %s", iface, windows_error_str(0));
return LIBUSB_ERROR_ACCESS; return LIBUSB_ERROR_ACCESS;
} }
} }
Expand Down

0 comments on commit 88eed06

Please sign in to comment.