Merge pull request #343 from localvar/fix-dead-code

fix dead code
This commit is contained in:
hzcheng 2019-08-15 14:25:13 +08:00 committed by GitHub
commit b3f41997ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -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;