From 8ae6d55db15bb0777e3d707afb994f6fcbcc6a65 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 31 Jul 2013 12:11:14 +0200 Subject: [PATCH] Don't use NULL --- src/libexpr/eval.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 0139f4eb0..904a95d16 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);