Changes in uspace/app/bdsh/input.c [3e6a98c5:b48d046] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/input.c
r3e6a98c5 rb48d046 41 41 #include <errno.h> 42 42 #include <assert.h> 43 #include < stdbool.h>43 #include <bool.h> 44 44 #include <tinput.h> 45 45 … … 67 67 int process_input(cliuser_t *usr) 68 68 { 69 token_t *tokens _buf= calloc(WORD_MAX, sizeof(token_t));70 if (tokens _buf== NULL)69 token_t *tokens = calloc(WORD_MAX, sizeof(token_t)); 70 if (tokens == NULL) 71 71 return ENOMEM; 72 token_t *tokens = tokens_buf;73 72 74 73 char *cmd[WORD_MAX]; … … 81 80 82 81 if (usr->line == NULL) { 83 free(tokens _buf);82 free(tokens); 84 83 return CL_EFAIL; 85 84 } … … 197 196 new_iostate.stdout = to; 198 197 } 199 198 200 199 rc = run_command(cmd, usr, &new_iostate); 201 200 … … 214 213 } 215 214 tok_fini(&tok); 216 free(tokens _buf);215 free(tokens); 217 216 218 217 return rc; … … 269 268 if (rc != EOK) { 270 269 /* Error in communication with console */ 271 cli_quit = 1;272 270 return; 273 271 }
Note:
See TracChangeset
for help on using the changeset viewer.