fix dead code

This commit is contained in:
localvar 2019-08-14 08:35:30 +08:00
parent 747e93260c
commit 44922907fd
1 changed files with 2 additions and 5 deletions

View File

@ -200,21 +200,18 @@ void shellReadCommand(TAOS *con, char command[]) {
void *shellLoopQuery(void *arg) { void *shellLoopQuery(void *arg) {
TAOS *con = (TAOS *)arg; TAOS *con = (TAOS *)arg;
char *command = malloc(MAX_COMMAND_SIZE); char command[MAX_COMMAND_SIZE];
while (1) { while (1) {
memset(command, 0, MAX_COMMAND_SIZE); memset(command, 0, MAX_COMMAND_SIZE);
shellPrintPrompt(); shellPrintPrompt();
// Read command from shell. // Read command from shell.
char command[MAX_COMMAND_SIZE];
shellReadCommand(con, command); shellReadCommand(con, command);
// Run the command // Run the command
if (command != NULL) {
shellRunCommand(con, command); shellRunCommand(con, command);
} }
}
return NULL; return NULL;
} }