Commit 45f8fc77 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: rename a variable, to be a bit more fitting

No related merge requests found
Showing with 5 additions and 5 deletions
+5 -5
...@@ -2510,16 +2510,16 @@ void construct_argument_list(char ***arguments, char *command, char *filename) ...@@ -2510,16 +2510,16 @@ void construct_argument_list(char ***arguments, char *command, char *filename)
{ {
char *copy_of_command = mallocstrcpy(NULL, command); char *copy_of_command = mallocstrcpy(NULL, command);
char *element = strtok(copy_of_command, " "); char *element = strtok(copy_of_command, " ");
size_t length = 2; int count = 2;
while (element != NULL) { while (element != NULL) {
*arguments = (char **)nrealloc(*arguments, ++length * sizeof(char *)); *arguments = (char **)nrealloc(*arguments, ++count * sizeof(char *));
(*arguments)[length - 3] = element; (*arguments)[count - 3] = element;
element = strtok(NULL, " "); element = strtok(NULL, " ");
} }
(*arguments)[length - 2] = filename; (*arguments)[count - 2] = filename;
(*arguments)[length - 1] = NULL; (*arguments)[count - 1] = NULL;
} }
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment