Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-09-06 06:31:16 +0400
committerDenys Vlasenko <vda.linux@googlemail.com>2011-09-06 06:31:16 +0400
commited058016bf8fc98271de2e58bfb650de9e9d304d (patch)
treeb6554880a7224a86c27429aaebfa6a5b16349b59 /shell/hush.c
parentcc272b06eefb87030bb85b686abdbc22b5ed1c34 (diff)
Apply post-1.19.1 patches, bump version to 1.19.21_19_2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/shell/hush.c b/shell/hush.c
index e4138adf7..de0af9cec 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -7817,20 +7817,24 @@ int hush_main(int argc, char **argv)
#if ENABLE_FEATURE_EDITING
G.line_input_state = new_line_input_t(FOR_SHELL);
-# if defined MAX_HISTORY && MAX_HISTORY > 0 && ENABLE_HUSH_SAVEHISTORY
+# if MAX_HISTORY > 0 && ENABLE_HUSH_SAVEHISTORY
{
const char *hp = get_local_var_value("HISTFILE");
if (!hp) {
hp = get_local_var_value("HOME");
- if (hp) {
- G.line_input_state->hist_file = concat_path_file(hp, ".hush_history");
- //set_local_var(xasprintf("HISTFILE=%s", ...));
- }
+ if (hp)
+ hp = concat_path_file(hp, ".hush_history");
+ } else {
+ hp = xstrdup(hp);
}
-# if ENABLE_FEATURE_SH_HISTFILESIZE
+ if (hp) {
+ G.line_input_state->hist_file = hp;
+ //set_local_var(xasprintf("HISTFILE=%s", ...));
+ }
+# if ENABLE_FEATURE_SH_HISTFILESIZE
hp = get_local_var_value("HISTFILESIZE");
G.line_input_state->max_history = size_from_HISTFILESIZE(hp);
-# endif
+# endif
}
# endif
#endif