diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index 38789dae9..4fe4f6437 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -1324,7 +1324,7 @@ bool CheckBufferOverrun::isArrayOfStruct(const Token* tok, int &position) if (Token::Match(tok->next(), "%var% [ %num% ] ")) { tok = tok->tokAt(4); int i = 1; - while (true) { + for (;;) { if (Token::Match(tok->next(), "[ %num% ] ")) { i++; tok = tok->tokAt(4);