diff options
author | Denys Vlasenko | 2018-12-27 18:03:20 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-12-27 18:03:20 +0100 |
commit | 3d27d435dbe7d39894257894b9dd32bfa607604c (patch) | |
tree | ddf5842839edb7c826ed54efa37d736c68750a2b /libbb/lineedit.c | |
parent | 2beb1f6fafc341f571501829fc17773f2e0ddbbf (diff) | |
download | busybox-3d27d435dbe7d39894257894b9dd32bfa607604c.zip busybox-3d27d435dbe7d39894257894b9dd32bfa607604c.tar.gz |
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r-- | libbb/lineedit.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 3ed38e5..0a888fa 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -1373,6 +1373,16 @@ void FAST_FUNC show_history(const line_input_t *st) printf("%4d %s\n", i, st->history[i]); } +void FAST_FUNC free_line_input_t(line_input_t *n) +{ +# if ENABLE_FEATURE_EDITING_SAVEHISTORY + int i = n->cnt_history; + while (i > 0) + free(n->history[--i]); +#endif + free(n); +} + # if ENABLE_FEATURE_EDITING_SAVEHISTORY /* We try to ensure that concurrent additions to the history * do not overwrite each other. @@ -1382,14 +1392,6 @@ void FAST_FUNC show_history(const line_input_t *st) * than configured MAX_HISTORY lines. */ -void FAST_FUNC free_line_input_t(line_input_t *n) -{ - int i = n->cnt_history; - while (i > 0) - free(n->history[--i]); - free(n); -} - /* state->flags is already checked to be nonzero */ static void load_history(line_input_t *st_parm) { |