--- libaitcli/src/aitcli.c 2022/12/05 22:23:38 1.19 +++ libaitcli/src/aitcli.c 2024/03/19 10:11:13 1.19.4.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitcli.c,v 1.19 2022/12/05 22:23:38 misho Exp $ +* $Id: aitcli.c,v 1.19.4.1 2024/03/19 10:11:13 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -1499,7 +1499,6 @@ int cliRun(linebuffer_t * __restrict cli_buffer, char *psInput, int prompt) { char *line, *s, *t, **app, *items[MAX_PROMPT_ITEMS]; - register int i; int ret = RETCODE_OK; struct tagCommand *cmd; @@ -1521,14 +1520,11 @@ cliRun(linebuffer_t * __restrict cli_buffer, char *psI (*app = strsep(&s, " \t")); *app ? app++ : app); // exec_cmd ... - i = 0; SLIST_FOREACH(cmd, &cli_buffer->line_cmds, cmd_next) { if (!(cmd->cmd_level & (1 << cli_buffer->line_level))) continue; if (*items[0] && !strncmp(cmd->cmd_name, items[0], strlen(items[0]))) break; - else - i++; } if (!cmd) {