projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
672a55e
)
hush: non-matching "case" statement sets $? to 0
author
Denys Vlasenko
<vda.linux@googlemail.com>
Fri, 4 Nov 2016 17:52:48 +0000
(18:52 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Fri, 4 Nov 2016 17:52:48 +0000
(18:52 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush.c
patch
|
blob
|
history
diff --git
a/shell/hush.c
b/shell/hush.c
index 336de75adc371ff1009649b1f797207d29e1967a..4c2ed6cead72ba0e9f081ef39f758ff043bb0ea9 100644
(file)
--- a/
shell/hush.c
+++ b/
shell/hush.c
@@
-7874,6
+7874,8
@@
static int run_list(struct pipe *pi)
#endif
#if ENABLE_HUSH_CASE
if (rword == RES_CASE) {
+ /* Case which does not match and execute anything still sets $? to 0 */
+ G.last_exitcode = rcode = EXIT_SUCCESS;
case_word = expand_strvec_to_string(pi->cmds->argv);
continue;
}