summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-11-04 00:09:09 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2011-11-04 00:09:09 (GMT)
commitc0cae52662ccced9df19f19ec94238d1b1e3bd71 (patch)
tree347aab81702ee44813ce7fa11536c3e87ceed657
parent9ce09bc9cb7743f87eb3e536c81d8c303e12bc81 (diff)
downloadbusybox-c0cae52662ccced9df19f19ec94238d1b1e3bd71.tar.gz
busybox-c0cae52662ccced9df19f19ec94238d1b1e3bd71.tar.bz2
lineedit: fix build failure
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/lineedit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 0d23288..1390ed6 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);