Trivial refactoring
This commit is contained in:
parent
4650e513e1
commit
f1e1f9b8f7
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue