Skip to content

Commit 52978c7

Browse files
Remove check that is always false
len is an unsigned variable, so it will never be less than 0. This helps towards arduino#1792.
1 parent b9add17 commit 52978c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: cores/arduino/USB/USBCore.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ uint32_t USBD_Available(uint32_t ep)
139139
// Return number of bytes read
140140
uint32_t USBD_Recv(uint32_t ep, void* d, uint32_t len)
141141
{
142-
if (!_usbConfiguration || len < 0)
142+
if (!_usbConfiguration)
143143
return -1;
144144

145145
LockEP lock(ep);

0 commit comments

Comments
 (0)