about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2013-08-30 08:49:30 -0700
committerCristian Cadar <c.cadar@imperial.ac.uk>2013-08-30 08:49:30 -0700
commit0efeb6c1826238fd732be11a94cc3403d78be8cc (patch)
tree1472c5b980e263cd5e901d903ef3c98c20a2306e
parent8cc2105aeb16e081a2ddd1128b6455cbdcb2ed3d (diff)
parent61a555abd558f1429624af000ee126bd60837f56 (diff)
downloadklee-0efeb6c1826238fd732be11a94cc3403d78be8cc.tar.gz
Merge pull request #20 from delcypher/remove_pointless_loop
Remove unnecessary loop from SolverTest unit test.
-rw-r--r--unittests/Solver/SolverTest.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/unittests/Solver/SolverTest.cpp b/unittests/Solver/SolverTest.cpp
index 3c9bf89a..94529d56 100644
--- a/unittests/Solver/SolverTest.cpp
+++ b/unittests/Solver/SolverTest.cpp
@@ -61,9 +61,7 @@ void testOperation(Solver &solver,
   // replaced value is appropriated constrained.
   for (unsigned kid = 0; kid < T::numKids; kid++) {
     std::vector<Expr::CreateArg> partiallyConstantArgs(symbolicArgs);
-    for (unsigned i = 0; i < T::numKids; i++)
-      if (i==kid)
-        partiallyConstantArgs[i] = getConstant(value, operandWidth);
+    partiallyConstantArgs[kid] = getConstant(value, operandWidth);
 
     ref<Expr> expr = 
       NotOptimizedExpr::create(EqExpr::create(partiallyConstantArgs[kid].expr,