From f32690e8a658acc4b935289d4719be1b004deb3b Mon Sep 17 00:00:00 2001 From: Leo C Date: Fri, 22 Apr 2016 09:11:02 +0200 Subject: Remove redundant hist_init() --- avr/cli_readline.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'avr') diff --git a/avr/cli_readline.c b/avr/cli_readline.c index e8f39ae..6aef92e 100644 --- a/avr/cli_readline.c +++ b/avr/cli_readline.c @@ -8,7 +8,7 @@ * (C) Copyright 2005 * JinHua Luo, GuangDong Linux Center, * - * SPDX-License-Identifier: GPL-2.0+ + * SPDX-License-Identifier: GPL-2.0 */ #include "common.h" @@ -259,19 +259,6 @@ static int_fast8_t hist_cur = -1; static char *hist_list[HIST_MAX]; -static void hist_init(void) -{ - int_fast8_t i; - - hist_max = 0; - hist_add_idx = 0; - hist_cur = -1; - - for (i = 0; i < HIST_MAX; i++) { - hist_list[i] = NULL; - } -} - static void cread_add_to_hist(char *line) { if (hist_max) { @@ -580,12 +567,6 @@ static int cli_readline_into_buffer(const FLASH char *const prompt, char *buffer #ifdef CONFIG_CMDLINE_EDITING uint_fast8_t len = CONFIG_SYS_CBSIZE; int rc; - static bool initted; - - if (!initted) { - hist_init(); - initted = 1; - } if (prompt) my_puts_P(prompt); -- cgit v1.2.3