run-command: introduce child_process_init()
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index 867f034b8ffc052d28f28a86fd9f52a5aa5b2c82..e7d4d4200f593ca43a1eba88fbc43bc5348a3afc 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -4931,7 +4931,7 @@ static char *run_textconv(const char *pgm, struct diff_filespec *spec,
        struct diff_tempfile *temp;
        const char *argv[3];
        const char **arg = argv;
-       struct child_process child;
+       struct child_process child = CHILD_PROCESS_INIT;
        struct strbuf buf = STRBUF_INIT;
        int err = 0;
 
@@ -4940,7 +4940,6 @@ static char *run_textconv(const char *pgm, struct diff_filespec *spec,
        *arg++ = temp->name;
        *arg = NULL;
 
-       memset(&child, 0, sizeof(child));
        child.use_shell = 1;
        child.argv = argv;
        child.out = -1;