diff options
author | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-09-27 17:10:14 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-09-27 17:10:14 +0200 |
commit | 27bf8f1deabda87d07a8b9c7e21b59484f1a197e (patch) | |
tree | 412801d9fe6719ef364971910cb92fd6ff91ba85 | |
parent | 66af4f96e26f32ee367fcf14ec424db31b226e74 (diff) | |
download | barebox-27bf8f1deabda87d07a8b9c7e21b59484f1a197e.tar.gz barebox-27bf8f1deabda87d07a8b9c7e21b59484f1a197e.tar.xz |
set last_return_code to rcode and not 1 or 0
-rw-r--r-- | common/hush.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/hush.c b/common/hush.c index c7c9ced8ec..9ad9542f7a 100644 --- a/common/hush.c +++ b/common/hush.c @@ -682,7 +682,7 @@ static int run_list_real(struct pipe *pi) last_return_code = -rcode - 2; return -2; /* exit */ } - last_return_code=(rcode == 0) ? 0 : 1; + last_return_code=rcode; if ( rmode == RES_IF || rmode == RES_ELIF ) next_if_code=rcode; /* can be overwritten a number of times */ if (rmode == RES_WHILE) |