diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index 9b4b08a2c..2b9ee5789 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -231,8 +231,7 @@ void CheckFunctions::checkMathFunctions() if ((MathLib::isInt(number) && MathLib::toLongNumber(number) <= 0) || (MathLib::isFloat(number) && MathLib::toDoubleNumber(number) <= 0.)) mathfunctionCallWarning(tok); - } - else if (Token::Match(tok, "log1p|log1pf|log1pl ( %num% )")) { + } else if (Token::Match(tok, "log1p|log1pf|log1pl ( %num% )")) { const std::string& number = tok->strAt(2); if ((MathLib::isInt(number) && MathLib::toLongNumber(number) <= -1) || (MathLib::isFloat(number) && MathLib::toDoubleNumber(number) <= -1.)) diff --git a/lib/checkstl.cpp b/lib/checkstl.cpp index 52b80966f..284727c67 100644 --- a/lib/checkstl.cpp +++ b/lib/checkstl.cpp @@ -399,9 +399,9 @@ void CheckStl::mismatchingContainers() const Token * const argTok = args[argnr - 1]; if (i->first) { firstArg = argTok; - } - if(i->last && firstArg && argTok && isSameExpression(true, false, firstArg, argTok, mSettings->library, false)) { - sameIteratorExpressionError(firstArg); + } + if (i->last && firstArg && argTok && isSameExpression(true, false, firstArg, argTok, mSettings->library, false)) { + sameIteratorExpressionError(firstArg); } const Variable *c = getContainer(argTok); if (c) {