diff options
Diffstat (limited to 'run-command.c')
-rw-r--r-- | run-command.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/run-command.c b/run-command.c index be6bc128cd..8750df16d8 100644 --- a/run-command.c +++ b/run-command.c @@ -11,9 +11,8 @@ void child_process_init(struct child_process *child) { - memset(child, 0, sizeof(*child)); - strvec_init(&child->args); - strvec_init(&child->env_array); + struct child_process blank = CHILD_PROCESS_INIT; + memcpy(child, &blank, sizeof(*child)); } void child_process_clear(struct child_process *child) |