aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-12-21 21:36:58 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-12-21 21:36:58 +0100
commit00eb23b47aa79461b913b320eba3c95b90e6eec4 (patch)
treeebeb54dcc6eb977247f5088be9cffc4deaea27e9 /shell/ash.c
parente4202df0918e13130bb511a4ce372cbbe089068d (diff)
downloadbusybox-00eb23b47aa79461b913b320eba3c95b90e6eec4.tar.gz
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/ash.c')
-rw-r--r--shell/ash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 87d329f87..f4d296289 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -14177,8 +14177,7 @@ exitshell(void)
char *p;
#if ENABLE_FEATURE_EDITING_SAVE_ON_EXIT
- if (line_input_state)
- save_history(line_input_state);
+ save_history(line_input_state); /* may be NULL */
#endif
savestatus = exitstatus;
TRACE(("pid %d, exitshell(%d)\n", getpid(), savestatus));