diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-21 21:36:58 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-21 21:36:58 +0100 |
commit | 00eb23b47aa79461b913b320eba3c95b90e6eec4 (patch) | |
tree | ebeb54dcc6eb977247f5088be9cffc4deaea27e9 /shell/hush.c | |
parent | e4202df0918e13130bb511a4ce372cbbe089068d (diff) | |
download | busybox-w32-00eb23b47aa79461b913b320eba3c95b90e6eec4.tar.gz busybox-w32-00eb23b47aa79461b913b320eba3c95b90e6eec4.tar.bz2 busybox-w32-00eb23b47aa79461b913b320eba3c95b90e6eec4.zip |
bc: do not allocate line editing state until needed
function old new delta
xc_read_line 324 353 +29
free_line_input_t 34 39 +5
xc_vm_init 656 640 -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 34/-16) Total: 18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c index a8f7237d5..f0f0da746 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2056,8 +2056,7 @@ static sighandler_t pick_sighandler(unsigned sig) | |||
2056 | static void hush_exit(int exitcode) | 2056 | static void hush_exit(int exitcode) |
2057 | { | 2057 | { |
2058 | #if ENABLE_FEATURE_EDITING_SAVE_ON_EXIT | 2058 | #if ENABLE_FEATURE_EDITING_SAVE_ON_EXIT |
2059 | if (G.line_input_state) | 2059 | save_history(G.line_input_state); /* may be NULL */ |
2060 | save_history(G.line_input_state); | ||
2061 | #endif | 2060 | #endif |
2062 | 2061 | ||
2063 | fflush_all(); | 2062 | fflush_all(); |