From f1e1f9b8f7c5862a0bbf732a09c252a23039a799 Mon Sep 17 00:00:00 2001 From: Reijo Tomperi Date: Thu, 1 Oct 2009 11:37:15 +0300 Subject: [PATCH] Trivial refactoring --- src/checkbufferoverrun.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/checkbufferoverrun.cpp b/src/checkbufferoverrun.cpp index 06ddc6c3a..4b71ef40b 100644 --- a/src/checkbufferoverrun.cpp +++ b/src/checkbufferoverrun.cpp @@ -319,12 +319,8 @@ void CheckBufferOverrun::checkScope(const Token *tok, const char *varname[], con if (loopTok->varId() == counter_varid) { // Counter variable used inside loop - if (Token::Match(loopTok->next(), "+=|-=|++|--|=")) - { - bailOut = true; - break; - } - else if (Token::Match(loopTok->previous(), "++|--")) + if (Token::Match(loopTok->next(), "+=|-=|++|--|=") || + Token::Match(loopTok->previous(), "++|--")) { bailOut = true; break;