diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-18 13:05:10 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-18 13:05:10 +0000 |
commit | 6008d8a3cc80c1d758f99ed1229ca2b9bcd4c3b1 (patch) | |
tree | 8373fd30800d5764e46f5c5b558861283fe5f372 /shell | |
parent | 38e626df4ddac2426afb336d2e1794913c022c15 (diff) | |
download | busybox-w32-6008d8a3cc80c1d758f99ed1229ca2b9bcd4c3b1.tar.gz busybox-w32-6008d8a3cc80c1d758f99ed1229ca2b9bcd4c3b1.tar.bz2 busybox-w32-6008d8a3cc80c1d758f99ed1229ca2b9bcd4c3b1.zip |
hush: fix thinko in error msg
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/shell/hush.c b/shell/hush.c index 6e181ce99..56a289777 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -6430,7 +6430,6 @@ static int builtin_export(char **argv) | |||
6430 | 6430 | ||
6431 | static int builtin_trap(char **argv) | 6431 | static int builtin_trap(char **argv) |
6432 | { | 6432 | { |
6433 | int i; | ||
6434 | int sig; | 6433 | int sig; |
6435 | char *new_cmd; | 6434 | char *new_cmd; |
6436 | 6435 | ||
@@ -6439,6 +6438,7 @@ static int builtin_trap(char **argv) | |||
6439 | 6438 | ||
6440 | argv++; | 6439 | argv++; |
6441 | if (!*argv) { | 6440 | if (!*argv) { |
6441 | int i; | ||
6442 | /* No args: print all trapped */ | 6442 | /* No args: print all trapped */ |
6443 | for (i = 0; i < NSIG; ++i) { | 6443 | for (i = 0; i < NSIG; ++i) { |
6444 | if (G.traps[i]) { | 6444 | if (G.traps[i]) { |
@@ -6452,7 +6452,6 @@ static int builtin_trap(char **argv) | |||
6452 | } | 6452 | } |
6453 | 6453 | ||
6454 | new_cmd = NULL; | 6454 | new_cmd = NULL; |
6455 | i = 0; | ||
6456 | /* If first arg is a number: reset all specified signals */ | 6455 | /* If first arg is a number: reset all specified signals */ |
6457 | sig = bb_strtou(*argv, NULL, 10); | 6456 | sig = bb_strtou(*argv, NULL, 10); |
6458 | if (errno == 0) { | 6457 | if (errno == 0) { |
@@ -6464,7 +6463,7 @@ static int builtin_trap(char **argv) | |||
6464 | if (sig < 0 || sig >= NSIG) { | 6463 | if (sig < 0 || sig >= NSIG) { |
6465 | ret = EXIT_FAILURE; | 6464 | ret = EXIT_FAILURE; |
6466 | /* Mimic bash message exactly */ | 6465 | /* Mimic bash message exactly */ |
6467 | bb_perror_msg("trap: %s: invalid signal specification", argv[i]); | 6466 | bb_perror_msg("trap: %s: invalid signal specification", argv[-1]); |
6468 | continue; | 6467 | continue; |
6469 | } | 6468 | } |
6470 | 6469 | ||
@@ -6488,8 +6487,8 @@ static int builtin_trap(char **argv) | |||
6488 | continue; | 6487 | continue; |
6489 | sigdelset(&G.blocked_set, sig); | 6488 | sigdelset(&G.blocked_set, sig); |
6490 | } | 6489 | } |
6491 | sigprocmask(SIG_SETMASK, &G.blocked_set, NULL); | ||
6492 | } | 6490 | } |
6491 | sigprocmask(SIG_SETMASK, &G.blocked_set, NULL); | ||
6493 | return ret; | 6492 | return ret; |
6494 | } | 6493 | } |
6495 | 6494 | ||