Skip to content

Commit 67e4387

Browse files
zakkiefacchinm
authored andcommitted
remove unnecessary if branch
checking `length` in below while statement Porting of arduino/ArduinoCore-avr#103
1 parent 3daf189 commit 67e4387

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Diff for: api/Stream.cpp

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

221221
size_t Stream::readBytesUntil(char terminator, char *buffer, size_t length)
222222
{
223-
if (length < 1) return 0;
224223
size_t index = 0;
225224
while (index < length) {
226225
int c = timedRead();

0 commit comments

Comments
 (0)