Trivial refactoring

This commit is contained in:
Reijo Tomperi 2009-10-01 11:37:15 +03:00
parent 4650e513e1
commit f1e1f9b8f7
1 changed files with 2 additions and 6 deletions

View File

@ -319,12 +319,8 @@ void CheckBufferOverrun::checkScope(const Token *tok, const char *varname[], con
if (loopTok->varId() == counter_varid) if (loopTok->varId() == counter_varid)
{ {
// Counter variable used inside loop // Counter variable used inside loop
if (Token::Match(loopTok->next(), "+=|-=|++|--|=")) if (Token::Match(loopTok->next(), "+=|-=|++|--|=") ||
{ Token::Match(loopTok->previous(), "++|--"))
bailOut = true;
break;
}
else if (Token::Match(loopTok->previous(), "++|--"))
{ {
bailOut = true; bailOut = true;
break; break;