diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 1c08b671d..069df71f5 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -1250,7 +1250,10 @@ static void valueFlowAST(Token *tok, unsigned int varid, const ValueFlow::Value const std::list &values = tok->astOperand1()->values(); bool nonzero = false; for (std::list::const_iterator it = values.begin(); it != values.end(); ++it) { - nonzero |= (it->intvalue != 0); + if (it->intvalue != 0) { + nonzero = true; + break; + } } if (!nonzero) return;