object_array: add a "clear" function
[gitweb.git] / credential.c
index 4d79d320f89e956aa9233a170120f05b2473ca59..1886ea50b3b3c2a213e34876de691fa3d0a83b6c 100644 (file)
@@ -205,11 +205,10 @@ static int run_credential_helper(struct credential *c,
                                 const char *cmd,
                                 int want_output)
 {
-       struct child_process helper;
+       struct child_process helper = CHILD_PROCESS_INIT;
        const char *argv[] = { NULL, NULL };
        FILE *fp;
 
-       memset(&helper, 0, sizeof(helper));
        argv[0] = cmd;
        helper.argv = argv;
        helper.use_shell = 1;