mirror of
https://github.com/sheumann/hush.git
synced 2024-12-28 22:30:05 +00:00
hush: remove extra comparison from prev commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
4d8e5fdc1d
commit
4f2c59b267
@ -2647,14 +2647,12 @@ static NOINLINE int expand_vars_to_list(o_string *output, int n, char *arg, char
|
|||||||
end = --exp_word;
|
end = --exp_word;
|
||||||
if (*exp_word != ':') /* not ${var::...} */
|
if (*exp_word != ':') /* not ${var::...} */
|
||||||
beg = bb_strtou(exp_word, &end, 0);
|
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 == ':') {
|
if (*end == ':') {
|
||||||
len = bb_strtou(end + 1, &end, 0);
|
len = bb_strtou(end + 1, &end, 0);
|
||||||
//bb_error_msg("len:%u end:'%s'", len, end);
|
//bb_error_msg("len:%u end:'%s'", len, end);
|
||||||
}
|
}
|
||||||
if (*end == '\0'
|
if (*end == '\0') {
|
||||||
&& end != exp_word /* not "${var:}" */
|
|
||||||
) {
|
|
||||||
//bb_error_msg("from val:'%s'", val);
|
//bb_error_msg("from val:'%s'", val);
|
||||||
if (!val || beg >= strlen(val))
|
if (!val || beg >= strlen(val))
|
||||||
val = "";
|
val = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user