summaryrefslogtreecommitdiff
path: root/prompt.c
diff options
context:
space:
mode:
Diffstat (limited to 'prompt.c')
-rw-r--r--prompt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/prompt.c b/prompt.c
index d7bb17cb66..e5b4938efc 100644
--- 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;