/branches/shell/uspace/app/bdsh/input.c |
---|
63,7 → 63,7 |
char *cmd[WORD_MAX]; |
int n = 0, i = 0; |
int rc = 0; |
char *tmp = cli_strdup(usr->line); |
char *tmp = (char *) NULL; |
if (NULL == usr->line) { |
rc = CL_EFAIL; |
70,6 → 70,8 |
goto finit; |
} |
tmp = cli_strdup(usr->line); |
/* Break up what the user typed, space delimited */ |
cmd[n] = cli_strtok(tmp, " "); |
while (cmd[n] && n < WORD_MAX) { |
115,7 → 117,9 |
free(usr->line); |
usr->line = (char *) NULL; |
} |
free(tmp); |
if (NULL != tmp) |
free(tmp); |
return rc; |
} |