diff options
author | Kristian Sloth Lauszus <lauszus@gmail.com> | 2015-04-21 00:08:02 +0200 |
---|---|---|
committer | Kristian Sloth Lauszus <lauszus@gmail.com> | 2015-04-21 00:08:02 +0200 |
commit | 2398ef5260a7437b45c1af9e49bc5891aea4f6d9 (patch) | |
tree | 5a7e82b2d6732d693a79f899cff62aa7561fa5a2 | |
parent | f3a5d45c3af4bec9927935f1bd5226c35d963c86 (diff) |
Fixed: warning: suggest explicit braces to avoid ambiguous 'else'
-rw-r--r-- | cores/arduino/Stream.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cores/arduino/Stream.cpp b/cores/arduino/Stream.cpp index 14f972a..9712859 100644 --- a/cores/arduino/Stream.cpp +++ b/cores/arduino/Stream.cpp @@ -265,11 +265,11 @@ int Stream::findMulti( struct Stream::MultiTarget *targets, int tCount) { for (struct MultiTarget *t = targets; t < targets+tCount; ++t) { // the simple case is if we match, deal with that first. - if (c == t->str[t->index]) - if (++t->index == t->len) - return t - targets; - else - continue; + if (c == t->str[t->index]) { + if (++t->index == t->len) + return t - targets; + } else + continue; // if not we need to walk back and see if we could have matched further // down the stream (ie '1112' doesn't match the first position in '11112' |