diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 3 | ||||
-rw-r--r-- | shell/hush.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c index 87d329f..f4d2962 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)); diff --git a/shell/hush.c b/shell/hush.c index a8f7237..f0f0da7 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -2056,8 +2056,7 @@ static sighandler_t pick_sighandler(unsigned sig) static void hush_exit(int exitcode) { #if ENABLE_FEATURE_EDITING_SAVE_ON_EXIT - if (G.line_input_state) - save_history(G.line_input_state); + save_history(G.line_input_state); /* may be NULL */ #endif fflush_all(); |