eval: Return status in eval functions
commitda534b740e628512e8e0e62729d6a2ef521e5096
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 7 Jun 2016 08:47:59 +0000 (7 16:47 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 Sep 2016 14:10:56 +0000 (2 22:10 +0800)
tree738f2514591e0de3ba1b38f40d483af3b90cd87d
parent203e8395faa9135956e3b2a2b749b6dd96a7e988
eval: Return status in eval functions

The exit status is currently clobbered too early for case statements
and loops.  This patch fixes it by making the eval functions return
the current exit status and setting them in one place -- evaltree.

Harald van Dijk pointed out a number of bugs in the original patch.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
src/eval.c
src/eval.h
src/main.c