Merge branch 'nd/ls-tree-pathspec'
[gitweb.git] / prompt.c
index d7bb17cb663c2f47ad59d34ecea17c6cc977e815..e5b4938efcf329eb4f25b6f90231c35abeacbbd3 100644 (file)
--- a/prompt.c
+++ b/prompt.c
@@ -6,7 +6,7 @@
 
 static char *do_askpass(const char *cmd, const char *prompt)
 {
-       struct child_process pass;
+       struct child_process pass = CHILD_PROCESS_INIT;
        const char *args[3];
        static struct strbuf buffer = STRBUF_INIT;
        int err = 0;
@@ -15,7 +15,6 @@ static char *do_askpass(const char *cmd, const char *prompt)
        args[1] = prompt;
        args[2] = NULL;
 
-       memset(&pass, 0, sizeof(pass));
        pass.argv = args;
        pass.out = -1;