Skip to content

Commit 82a404b

Browse files
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Fix #8260 Improve check: Pointer calculation result not null
1 parent e9c76dd commit 82a404b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkcondition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1854,7 +1854,7 @@ void CheckConditionImpl::checkPointerAdditionResultNotNull()
18541854
if (!calcToken)
18551855
continue;
18561856

1857-
if (tok->isComparisonOp() && tok->astOperand1() && tok->astOperand2()) {
1857+
if (tok->isComparisonOp() && tok->isBinaryOp()) {
18581858
const Token *exprToken = tok->astOperand1() == calcToken ? tok->astOperand2() : tok->astOperand1();
18591859

18601860
if (!exprToken->hasKnownIntValue() || !exprToken->getValue(0))

0 commit comments

Comments
 (0)