int r = 0;
usbi_dbg("interface %d", interface_number);
- if (interface_number >= sizeof(dev->claimed_interfaces) * 8)
+ if (interface_number >= USB_MAXINTERFACES)
return LIBUSB_ERROR_INVALID_PARAM;
usbi_mutex_lock(&dev->lock);
int r;
usbi_dbg("interface %d", interface_number);
- if (interface_number >= sizeof(dev->claimed_interfaces) * 8)
+ if (interface_number >= USB_MAXINTERFACES)
return LIBUSB_ERROR_INVALID_PARAM;
usbi_mutex_lock(&dev->lock);
{
usbi_dbg("interface %d altsetting %d",
interface_number, alternate_setting);
- if (interface_number >= sizeof(dev->claimed_interfaces) * 8)
+ if (interface_number >= USB_MAXINTERFACES)
return LIBUSB_ERROR_INVALID_PARAM;
usbi_mutex_lock(&dev->lock);