summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-27 17:10:14 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-09-27 17:10:14 +0200
commit27bf8f1deabda87d07a8b9c7e21b59484f1a197e (patch)
tree412801d9fe6719ef364971910cb92fd6ff91ba85 /common
parent66af4f96e26f32ee367fcf14ec424db31b226e74 (diff)
downloadbarebox-27bf8f1deabda87d07a8b9c7e21b59484f1a197e.tar.gz
barebox-27bf8f1deabda87d07a8b9c7e21b59484f1a197e.tar.xz
set last_return_code to rcode and not 1 or 0
Diffstat (limited to 'common')
-rw-r--r--common/hush.c2
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)