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 87d329f87..f4d296289 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -14177,8 +14177,7 @@ exitshell(void) | |||
| 14177 | char *p; | 14177 | char *p; |
| 14178 | 14178 | ||
| 14179 | #if ENABLE_FEATURE_EDITING_SAVE_ON_EXIT | 14179 | #if ENABLE_FEATURE_EDITING_SAVE_ON_EXIT |
| 14180 | if (line_input_state) | 14180 | save_history(line_input_state); /* may be NULL */ |
| 14181 | save_history(line_input_state); | ||
| 14182 | #endif | 14181 | #endif |
| 14183 | savestatus = exitstatus; | 14182 | savestatus = exitstatus; |
| 14184 | TRACE(("pid %d, exitshell(%d)\n", getpid(), savestatus)); | 14183 | TRACE(("pid %d, exitshell(%d)\n", getpid(), savestatus)); |
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(); |
