From 8e35973ff94859ed25a0906455ce2a46d4145937 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 18 Feb 2014 21:02:26 +0100 Subject: [PATCH] Remove check that is always false len is an unsigned variable, so it will never be less than 0. This helps towards #1792. --- hardware/arduino/sam/cores/arduino/USB/USBCore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/arduino/sam/cores/arduino/USB/USBCore.cpp b/hardware/arduino/sam/cores/arduino/USB/USBCore.cpp index 7876762b7..b086e5080 100644 --- a/hardware/arduino/sam/cores/arduino/USB/USBCore.cpp +++ b/hardware/arduino/sam/cores/arduino/USB/USBCore.cpp @@ -139,7 +139,7 @@ uint32_t USBD_Available(uint32_t ep) // Return number of bytes read uint32_t USBD_Recv(uint32_t ep, void* d, uint32_t len) { - if (!_usbConfiguration || len < 0) + if (!_usbConfiguration) return -1; LockEP lock(ep);