From 60c42b17a69b4d3f22201d0de7bd7ad690135a1f Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 25 Jun 2020 15:46:30 -0500 Subject: [PATCH] Fix known conditions --- lib/astutils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/astutils.cpp b/lib/astutils.cpp index 8a83e6584..f5224df30 100644 --- a/lib/astutils.cpp +++ b/lib/astutils.cpp @@ -1369,11 +1369,11 @@ bool isVariableChangedByFunctionCall(const Token *tok, int indirect, const Setti return false; } - if (addressOf || (indirect > 0 && arg && arg->isPointer())) { - if (!(arg && arg->isConst())) + if (addressOf || (indirect > 0 && arg->isPointer())) { + if (!arg->isConst()) return true; // If const is applied to the pointer, then the value can still be modified - if (arg && Token::simpleMatch(arg->typeEndToken(), "* const")) + if (Token::simpleMatch(arg->typeEndToken(), "* const")) return true; }