Skip to content

Commit f3e7a39

Browse files
committed
Fixed: warning: suggest explicit braces to avoid ambiguous 'else'
1 parent 38d5e91 commit f3e7a39

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

hardware/arduino/avr/cores/arduino/Stream.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,11 @@ int Stream::findMulti( struct Stream::MultiTarget *targets, int tCount) {
265265

266266
for (struct MultiTarget *t = targets; t < targets+tCount; ++t) {
267267
// the simple case is if we match, deal with that first.
268-
if (c == t->str[t->index])
269-
if (++t->index == t->len)
270-
return t - targets;
271-
else
272-
continue;
268+
if (c == t->str[t->index]) {
269+
if (++t->index == t->len)
270+
return t - targets;
271+
} else
272+
continue;
273273

274274
// if not we need to walk back and see if we could have matched further
275275
// down the stream (ie '1112' doesn't match the first position in '11112'

0 commit comments

Comments
 (0)