Merge pull request #416 from Dmitry-Me/removeDuplicateChecks

Remove duplicate checks
This commit is contained in:
PKEuS 2014-09-04 07:46:45 +02:00
commit 5d0aa15002
1 changed files with 2 additions and 2 deletions

View File

@ -1306,9 +1306,9 @@ static void valueFlowForLoopSimplify(Token * const bodyStart, const unsigned int
while (parent) {
const Token * const p = parent;
parent = parent->astParent();
if (parent && parent->str() == ":")
if (!parent || parent->str() == ":")
break;
if (parent && parent->str() == "?") {
if (parent->str() == "?") {
if (parent->astOperand2() != p)
parent = NULL;
break;