From ee9b7283ec0b698bea450706d225096dec6085d8 Mon Sep 17 00:00:00 2001 From: Martin Ettl Date: Sun, 29 Sep 2013 13:33:46 +0200 Subject: [PATCH] checkother:checkComparisonFunctionIsAlwaysTrueOrFalse: Removed redudant varid != 0 check. No functional changes. --- lib/checkother.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 2aad4e844..2dd430adb 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -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);