summaryrefslogtreecommitdiff
path: root/convert.c
diff options
context:
space:
mode:
Diffstat (limited to 'convert.c')
-rw-r--r--convert.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/convert.c b/convert.c
index 677d339a8b..9a5612e93d 100644
--- a/convert.c
+++ b/convert.c
@@ -322,7 +322,7 @@ static int filter_buffer_or_fd(int in, int out, void *data)
/*
* Spawn cmd and feed the buffer contents through its stdin.
*/
- struct child_process child_process;
+ struct child_process child_process = CHILD_PROCESS_INIT;
struct filter_params *params = (struct filter_params *)data;
int write_err, status;
const char *argv[] = { NULL, NULL };
@@ -345,7 +345,6 @@ static int filter_buffer_or_fd(int in, int out, void *data)
argv[0] = cmd.buf;
- memset(&child_process, 0, sizeof(child_process));
child_process.argv = argv;
child_process.use_shell = 1;
child_process.in = -1;