hush: remove extra comparison from prev commit
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 20 May 2010 23:25:16 +0000 (01:25 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 20 May 2010 23:25:16 +0000 (01:25 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush.c

index 0333395f8e383ad60c740a23a8d763fd60884d7e..945077d87a9e03bcee15a514bf59058ff3ceaf28 100644 (file)
@@ -2647,14 +2647,12 @@ static NOINLINE int expand_vars_to_list(o_string *output, int n, char *arg, char
                                        end = --exp_word;
                                        if (*exp_word != ':') /* not ${var::...} */
                                                beg = bb_strtou(exp_word, &end, 0);
-                                               //bb_error_msg("beg:'%s'=%u end:'%s'", exp_word, beg, end);
+                                       //bb_error_msg("beg:'%s'=%u end:'%s'", exp_word, beg, end);
                                        if (*end == ':') {
                                                len = bb_strtou(end + 1, &end, 0);
                                                //bb_error_msg("len:%u end:'%s'", len, end);
                                        }
-                                       if (*end == '\0'
-                                        && end != exp_word /* not "${var:}" */
-                                       ) {
+                                       if (*end == '\0') {
                                                //bb_error_msg("from val:'%s'", val);
                                                if (!val || beg >= strlen(val))
                                                        val = "";