From 44922907fd32a1cc9f55a2537d18dbb054f14531 Mon Sep 17 00:00:00 2001 From: localvar Date: Wed, 14 Aug 2019 08:35:30 +0800 Subject: [PATCH] fix dead code --- src/kit/shell/src/shellWindows.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/kit/shell/src/shellWindows.c b/src/kit/shell/src/shellWindows.c index 3bb9b34578..325a81a91e 100644 --- a/src/kit/shell/src/shellWindows.c +++ b/src/kit/shell/src/shellWindows.c @@ -200,20 +200,17 @@ void shellReadCommand(TAOS *con, char command[]) { void *shellLoopQuery(void *arg) { TAOS *con = (TAOS *)arg; - char *command = malloc(MAX_COMMAND_SIZE); + char command[MAX_COMMAND_SIZE]; while (1) { memset(command, 0, MAX_COMMAND_SIZE); shellPrintPrompt(); // Read command from shell. - char command[MAX_COMMAND_SIZE]; shellReadCommand(con, command); // Run the command - if (command != NULL) { - shellRunCommand(con, command); - } + shellRunCommand(con, command); } return NULL; -- GitLab