summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/ezusb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/ezusb.c b/examples/ezusb.c
index f369e50..e3b488d 100644
--- a/examples/ezusb.c
+++ b/examples/ezusb.c
@@ -133,7 +133,7 @@ static int ezusb_write(libusb_device_handle *device, const char *label,
LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE,
opcode, addr & 0xFFFF, addr >> 16,
(unsigned char*)data, (uint16_t)len, 1000);
- if (status != len) {
+ if (status != (signed)len) {
if (status < 0)
logerror("%s: %s\n", label, libusb_error_name(status));
else
@@ -156,7 +156,7 @@ static int ezusb_read(libusb_device_handle *device, const char *label,
LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE,
opcode, addr & 0xFFFF, addr >> 16,
(unsigned char*)data, (uint16_t)len, 1000);
- if (status != len) {
+ if (status != (signed)len) {
if (status < 0)
logerror("%s: %s\n", label, libusb_error_name(status));
else