Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3268 → Rev 3269

/branches/shell/uspace/app/bdsh/input.c
63,15 → 63,13
char *cmd[WORD_MAX];
int n = 0, i = 0;
int rc = 0;
char *tmp = (char *) NULL;
char *tmp;
 
if (NULL == usr->line) {
rc = CL_EFAIL;
goto finit;
}
if (NULL == usr->line)
return CL_EFAIL;
 
tmp = cli_strdup(usr->line);
 
cli_verbose("Tok: tmp = %s", tmp);
/* Break up what the user typed, space delimited */
cmd[n] = cli_strtok(tmp, " ");
while (cmd[n] && n < WORD_MAX) {
78,6 → 76,9
cmd[++n] = cli_strtok(NULL, " ");
}
 
for (n = 0; cmd[n] != NULL; n++)
cli_verbose("arg[%d] => `%s'", n, cmd[n]);
 
/* We have rubbish */
if (NULL == cmd[0]) {
rc = CL_ENOENT;
113,6 → 114,7
}
 
finit:
/* Why is free complaining about these ?
if (NULL != usr->line) {
free(usr->line);
usr->line = (char *) NULL;
119,7 → 121,7
}
if (NULL != tmp)
free(tmp);
 
*/
return rc;
}