From c0cae52662ccced9df19f19ec94238d1b1e3bd71 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 4 Nov 2011 01:09:09 +0100 Subject: lineedit: fix build failure Signed-off-by: Denys Vlasenko --- libbb/lineedit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 0d232889b..1390ed62d 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -1520,8 +1520,10 @@ static void remember_in_history(char *str) for (i = 0; i < state->max_history-1; i++) state->history[i] = state->history[i+1]; /* i == state->max_history-1 */ - if (ENABLE_FEATURE_EDITING_SAVE_ON_EXIT && state->cnt_history_in_file) +# if ENABLE_FEATURE_EDITING_SAVE_ON_EXIT + if (state->cnt_history_in_file) state->cnt_history_in_file--; +# endif } /* i <= state->max_history-1 */ state->history[i++] = xstrdup(str); -- cgit v1.2.3