Skip to content

Commit

Permalink
Removes unnecessary if branch(because length is checked in while stat…
Browse files Browse the repository at this point in the history
…ement below the if-clause).
  • Loading branch information
MCUdude committed Jan 19, 2023
1 parent 13d1f76 commit 221900d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ size_t Stream::readBytes(char *buffer, size_t length)

size_t Stream::readBytesUntil(char terminator, char *buffer, size_t length)
{
if (length < 1) return 0;
size_t index = 0;
while (index < length) {
int c = timedRead();
Expand Down

0 comments on commit 221900d

Please sign in to comment.