summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libusb/os/linux_usbfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c
index 73529dc..820100f 100644
--- a/libusb/os/linux_usbfs.c
+++ b/libusb/os/linux_usbfs.c
@@ -597,7 +597,8 @@ static int op_clear_halt(struct libusb_device_handle *handle,
unsigned char endpoint)
{
int fd = __device_handle_priv(handle)->fd;
- int r = ioctl(fd, IOCTL_USBFS_CLEAR_HALT, &endpoint);
+ unsigned int _endpoint = endpoint;
+ int r = ioctl(fd, IOCTL_USBFS_CLEAR_HALT, &_endpoint);
if (r) {
if (errno == ENOENT)
return LIBUSB_ERROR_NOT_FOUND;