Skip to content

Commit 317513b

Browse files
authored
Merge pull request #103 from zakkie/fix/remove_if
Removes unnecessary if branch (because length is checked in while statement below the if-clause).
2 parents 7a2e1cd + 29bfd08 commit 317513b

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)