diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-07-31T10·11+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-07-31T10·11+0200 |
commit | 8ae6d55db15bb0777e3d707afb994f6fcbcc6a65 (patch) | |
tree | bb0168a0d7908ee9a26a8944fbeeecd1dbcdef9e /src | |
parent | e068f49f7dc59788cf356acfc77db614db6b28f0 (diff) |
Don't use NULL
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/eval.cc | 6 |
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); |