aboutsummaryrefslogtreecommitdiff
path: root/lib/libusb/libusb10.c
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2012-04-25 17:54:26 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2012-04-25 17:54:26 +0000
commit85ff9a0313a61bcb8708fec663a73da449dcc49f (patch)
tree38ab24ae47560b1dfbcddd5a50952db47b955ca5 /lib/libusb/libusb10.c
parentfca56fb2c3d3ad001e81340edfb6812db94805cf (diff)
downloadsrc-85ff9a0313a61bcb8708fec663a73da449dcc49f.tar.gz
src-85ff9a0313a61bcb8708fec663a73da449dcc49f.zip
Fix binary compatibility to the official LibUSB 1.0.
This is useful for GNU/kFreeBSD and the libusb2debian port. Applications using the asynchronous API of LibUSB 1.0 needs to be recompiled after this update. Found by: lme @
Notes
Notes: svn path=/head/; revision=234684
Diffstat (limited to 'lib/libusb/libusb10.c')
-rw-r--r--lib/libusb/libusb10.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c
index 893160ee7921..44331bc6ad3c 100644
--- a/lib/libusb/libusb10.c
+++ b/lib/libusb/libusb10.c
@@ -1322,7 +1322,7 @@ libusb_submit_transfer(struct libusb_transfer *uxfer)
struct libusb20_transfer *pxfer1;
struct libusb_super_transfer *sxfer;
struct libusb_device *dev;
- uint32_t endpoint;
+ uint8_t endpoint;
int err;
if (uxfer == NULL)
@@ -1333,9 +1333,6 @@ libusb_submit_transfer(struct libusb_transfer *uxfer)
endpoint = uxfer->endpoint;
- if (endpoint > 255)
- return (LIBUSB_ERROR_INVALID_PARAM);
-
dev = libusb_get_device(uxfer->dev_handle);
DPRINTF(dev->ctx, LIBUSB_DEBUG_FUNCTION, "libusb_submit_transfer enter");
@@ -1385,7 +1382,7 @@ libusb_cancel_transfer(struct libusb_transfer *uxfer)
struct libusb20_transfer *pxfer1;
struct libusb_super_transfer *sxfer;
struct libusb_device *dev;
- uint32_t endpoint;
+ uint8_t endpoint;
int retval;
if (uxfer == NULL)
@@ -1397,9 +1394,6 @@ libusb_cancel_transfer(struct libusb_transfer *uxfer)
endpoint = uxfer->endpoint;
- if (endpoint > 255)
- return (LIBUSB_ERROR_INVALID_PARAM);
-
dev = libusb_get_device(uxfer->dev_handle);
DPRINTF(dev->ctx, LIBUSB_DEBUG_FUNCTION, "libusb_cancel_transfer enter");