From 68d650e9ac980909b863abf4e26a30efad8b631b Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Wed, 3 Sep 2014 14:17:34 +0400 Subject: [PATCH] Remove duplicate checks --- lib/valueflow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 5cb8403d3..b71c93076 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -1308,9 +1308,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;