hush: simplify process_command_subs()
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 13 Feb 2018 14:30:13 +0000 (15:30 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 13 Feb 2018 14:31:19 +0000 (15:31 +0100)
commitaa617ac09703f31e9f80836f8d8f9349b52578ee
tree8fcfa982a5067107e514c3b299571bd5feb7099a
parent8de5b9f88ba9fe2f203abab9ca7d85129c3eb679
hush: simplify process_command_subs()

Incidentally, this fixes LINENO bug here:

echo "1:${LINENO}"
echo "2:`echo; echo`"  # was counting lines in the `cmd` output as LINENO++
echo "3:${LINENO}"

function                                             old     new   delta
parse_and_run_file                                    53      71     +18
expand_vars_to_list                                 1187    1164     -23
setup_file_in_str                                     25       -     -25
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/1 up/down: 18/-48)            Total: -30 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush.c