cleanup redundant valueflow check. if there are no values the getValue will return NULL.
This commit is contained in:
parent
27cee5caa5
commit
bc2ba1706b
|
@ -2213,7 +2213,7 @@ void CheckOther::checkZeroDivision()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
zerodivError(tok,false);
|
zerodivError(tok,false);
|
||||||
} else if (Token::Match(tok, "[/%]") && tok->astOperand2() && !tok->astOperand2()->values.empty()) {
|
} else if (Token::Match(tok, "[/%]") && tok->astOperand2()) {
|
||||||
// Value flow..
|
// Value flow..
|
||||||
const ValueFlow::Value *value = tok->astOperand2()->getValue(0LL);
|
const ValueFlow::Value *value = tok->astOperand2()->getValue(0LL);
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|
Loading…
Reference in New Issue