Changes in kernel/generic/src/console/kconsole.c [a7199c2:7a0359b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/kconsole.c
ra7199c2 r7a0359b 210 210 link_t *pos = NULL; 211 211 const char *hint; 212 char *output = malloc(MAX_CMDLINE, 0);212 char output[MAX_CMDLINE]; 213 213 214 214 output[0] = 0; … … 235 235 str_cpy(input, size, output); 236 236 237 free(output);238 237 return found; 239 238 } … … 246 245 wchar_t *current = history[history_pos]; 247 246 current[0] = 0; 248 char *tmp = malloc(STR_BOUNDS(MAX_CMDLINE), 0);249 247 250 248 while (true) { … … 291 289 beg++; 292 290 291 char tmp[STR_BOUNDS(MAX_CMDLINE)]; 293 292 wstr_to_str(tmp, position - beg + 1, current + beg); 294 293 … … 416 415 } 417 416 418 free(tmp);419 417 return current; 420 418 } … … 632 630 cmd->argv[i].vartype = ARG_TYPE_STRING; 633 631 } else { 634 printf("Wrong syn tax.\n");632 printf("Wrong synxtax.\n"); 635 633 error = true; 636 634 } … … 690 688 printf("Type \"exit\" to leave the console.\n"); 691 689 692 char *cmdline = malloc(STR_BOUNDS(MAX_CMDLINE), 0);693 690 while (true) { 694 691 wchar_t *tmp = clever_readline((char *) prompt, stdin); … … 697 694 continue; 698 695 696 char cmdline[STR_BOUNDS(MAX_CMDLINE)]; 699 697 wstr_to_str(cmdline, STR_BOUNDS(MAX_CMDLINE), tmp); 700 698 … … 708 706 (void) cmd_info->func(cmd_info->argv); 709 707 } 710 free(cmdline);711 708 } 712 709
Note:
See TracChangeset
for help on using the changeset viewer.