main: Only set savestatus in exitcmd
commitd17dacd0f0499a8c77d810e211e8ff96b8898c48
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 18 May 2018 18:39:38 +0000 (19 02:39 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 28 May 2018 09:12:22 +0000 (28 17:12 +0800)
treedcbcc46daeee8f85324304539012bf6396f0ee66
parenta332ebdaa13d3eaf70082e1be214c42645bc186a
main: Only set savestatus in exitcmd

Currently exitcmd sets exitstatus and then savestatus if the latter
was previously set.  In fact, as exitcmd always raises an exception
and will either end up in the setjmp call in main() or exitshell(),
where exitstatus is always replaced by savestatus if set, we only
need to set savestatus.

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