diff options
author | Alexander Entinger <consulting@lxrobotics.com> | 2019-09-16 10:03:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-16 10:03:46 +0200 |
commit | 317513b9c989de24d438de7ac55d701b738881e2 (patch) | |
tree | 0da1f81fc6527d20eee98a5e13d94313ad662a5d /cores | |
parent | 7a2e1cd815266fef3012a5c9b48f88d78551f838 (diff) | |
parent | 29bfd08cd7fc1399f897255f81804595a4776d16 (diff) |
Merge pull request #103 from zakkie/fix/remove_if
Removes unnecessary if branch (because length is checked in while statement below the if-clause).
Diffstat (limited to 'cores')
-rw-r--r-- | cores/arduino/Stream.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/cores/arduino/Stream.cpp b/cores/arduino/Stream.cpp index d284631..9eff663 100644 --- a/cores/arduino/Stream.cpp +++ b/cores/arduino/Stream.cpp @@ -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(); |