cleanup redundant valueflow check. if there are no values the getValue will return NULL.

This commit is contained in:
Daniel Marjamäki 2014-05-28 21:03:16 +02:00
parent 27cee5caa5
commit bc2ba1706b
1 changed files with 1 additions and 1 deletions

View File

@ -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) {