Skip to content
Snippets Groups Projects
Commit 4fd6d731 authored by Christian Mehlis's avatar Christian Mehlis
Browse files

Merge pull request #678 from mehlis/shell-no-copy

shell: remove useless copying of input string
parents 4b012dfa 33239487
No related branches found
No related tags found
No related merge requests found
...@@ -90,10 +90,8 @@ static void print_help(const shell_command_t *command_list) ...@@ -90,10 +90,8 @@ static void print_help(const shell_command_t *command_list)
static void handle_input_line(shell_t *shell, char *line) static void handle_input_line(shell_t *shell, char *line)
{ {
char line_copy[shell->shell_buffer_size];
char *saveptr; char *saveptr;
strncpy(line_copy, line, sizeof(line_copy)); char *command = strtok_r(line, " ", &saveptr);
char *command = strtok_r(line_copy, " ", &saveptr);
void (*handler)(char *) = NULL; void (*handler)(char *) = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment