diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-21 01:25:16 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-21 01:25:16 +0200 |
commit | 4f2c59b267a4840986c95e22bd302b4216bfb8cf (patch) | |
tree | 39093abe0f674fc5b1aebfc8200fb8b92cef1a7a /shell/hush.c | |
parent | 4d8e5fdc1d4bb14ebfecdf6ce19e15024103659f (diff) | |
download | busybox-w32-4f2c59b267a4840986c95e22bd302b4216bfb8cf.tar.gz busybox-w32-4f2c59b267a4840986c95e22bd302b4216bfb8cf.tar.bz2 busybox-w32-4f2c59b267a4840986c95e22bd302b4216bfb8cf.zip |
hush: remove extra comparison from prev commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/shell/hush.c b/shell/hush.c index 0333395f8..945077d87 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2647,14 +2647,12 @@ static NOINLINE int expand_vars_to_list(o_string *output, int n, char *arg, char | |||
2647 | end = --exp_word; | 2647 | end = --exp_word; |
2648 | if (*exp_word != ':') /* not ${var::...} */ | 2648 | if (*exp_word != ':') /* not ${var::...} */ |
2649 | beg = bb_strtou(exp_word, &end, 0); | 2649 | beg = bb_strtou(exp_word, &end, 0); |
2650 | //bb_error_msg("beg:'%s'=%u end:'%s'", exp_word, beg, end); | 2650 | //bb_error_msg("beg:'%s'=%u end:'%s'", exp_word, beg, end); |
2651 | if (*end == ':') { | 2651 | if (*end == ':') { |
2652 | len = bb_strtou(end + 1, &end, 0); | 2652 | len = bb_strtou(end + 1, &end, 0); |
2653 | //bb_error_msg("len:%u end:'%s'", len, end); | 2653 | //bb_error_msg("len:%u end:'%s'", len, end); |
2654 | } | 2654 | } |
2655 | if (*end == '\0' | 2655 | if (*end == '\0') { |
2656 | && end != exp_word /* not "${var:}" */ | ||
2657 | ) { | ||
2658 | //bb_error_msg("from val:'%s'", val); | 2656 | //bb_error_msg("from val:'%s'", val); |
2659 | if (!val || beg >= strlen(val)) | 2657 | if (!val || beg >= strlen(val)) |
2660 | val = ""; | 2658 | val = ""; |