about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/eval.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 0139f4eb01f9..904a95d16034 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -310,9 +310,8 @@ inline Value * EvalState::lookupVar(Env * env, const VarRef & var, bool noEval)
     
     if (var.fromWith) {
         while (1) {
-            if (env->values[0] == NULL) {
-                if (noEval)
-                    return NULL;
+            if (!env->values[0]) {
+                if (noEval) return 0;
                 env->values[0] = allocValue();
                 evalAttrs(*env->up, env->withAttrs, *env->values[0]);
             }
@@ -830,7 +829,6 @@ void ExprWith::eval(EvalState & state, Env & env, Value & v)
     Env & env2(state.allocEnv(1));
     env2.up = &env;
     env2.prevWith = prevWith;
-
     env2.withAttrs = attrs;
 
     body->eval(state, env2, v);