Skip to content

Commit 29bfd08

Browse files
authored
remove unnecessary if branch
checking `length` in below while statement
1 parent 7a2e1cd commit 29bfd08

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

cores/arduino/Stream.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ size_t Stream::readBytes(char *buffer, size_t length)
218218

219219
size_t Stream::readBytesUntil(char terminator, char *buffer, size_t length)
220220
{
221-
if (length < 1) return 0;
222221
size_t index = 0;
223222
while (index < length) {
224223
int c = timedRead();

0 commit comments

Comments
 (0)