about summary refs log tree commit diff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-04-16T13·51+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-04-16T13·51+0000
commit497e4ad12650e27ecbaf0e056fe0c54bc12a138b (patch)
treeba08ea2e45b2613dcb9c823084da2e314c43fc94 /src/libexpr/eval.cc
parent02c1dac90934e1b833c4d6bd9280bda27c146d80 (diff)
* Remove some redundant tests.
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index ac475c893173..89534688ece0 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -1013,13 +1013,13 @@ bool EvalState::eqValues(Value & v1, Value & v2)
             return true;
 
         case tList:
-            if (v2.type != tList || v1.list.length != v2.list.length) return false;
+            if (v1.list.length != v2.list.length) return false;
             for (unsigned int n = 0; n < v1.list.length; ++n)
                 if (!eqValues(*v1.list.elems[n], *v2.list.elems[n])) return false;
             return true;
 
         case tAttrs: {
-            if (v2.type != tAttrs || v1.attrs->size() != v2.attrs->size()) return false;
+            if (v1.attrs->size() != v2.attrs->size()) return false;
             Bindings::iterator i, j;
             for (i = v1.attrs->begin(), j = v2.attrs->begin(); i != v1.attrs->end(); ++i, ++j)
                 if (i->first != j->first || !eqValues(i->second, j->second)) return false;
@@ -1055,7 +1055,7 @@ void EvalState::printStats()
         % nrValuesInEnvs % (nrValuesInEnvs * sizeof(Value)));
     printMsg(v, format("  list elements: %1% (%2% bytes)")
         % nrListElems % (nrListElems * sizeof(Value *)));
-    printMsg(v, format("  misc. values allocated: %1% (%2% bytes) ")
+    printMsg(v, format("  misc. values allocated: %1% (%2% bytes)")
         % nrValues % (nrValues * sizeof(Value)));
     printMsg(v, format("  symbols in symbol table: %1%") % symbols.size());
 }