checkother:checkComparisonFunctionIsAlwaysTrueOrFalse: Removed redudant varid != 0 check. No functional changes.

This commit is contained in:
Martin Ettl 2013-09-29 13:33:46 +02:00
parent 973bdcc6d8
commit ee9b7283ec
1 changed files with 1 additions and 1 deletions

View File

@ -3278,7 +3278,7 @@ void CheckOther::checkComparisonFunctionIsAlwaysTrueOrFalse(void)
const unsigned int varidRight = tok->tokAt(4)->varId();// get the right varid
// compare varids: if they are not zero but equal
// --> the comparison function is calles with the same variables
if (varidLeft != 0 && varidRight != 0 && varidLeft == varidRight) {
if (varidLeft != 0 && varidLeft == varidRight) {
if (functionName == "isgreater" || functionName == "isless" || functionName == "islessgreater") {
// e.g.: isgreater(x,x) --> (x)>(x) --> false
checkComparisonFunctionIsAlwaysTrueOrFalseError(tok,functionName,varNameLeft,false);