summaryrefslogtreecommitdiff
path: root/prompt.c
diff options
context:
space:
mode:
Diffstat (limited to 'prompt.c')
-rw-r--r--prompt.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/prompt.c b/prompt.c
index 5ded21a017..50df17279d 100644
--- a/prompt.c
+++ b/prompt.c
@@ -8,15 +8,12 @@
static char *do_askpass(const char *cmd, const char *prompt)
{
struct child_process pass = CHILD_PROCESS_INIT;
- const char *args[3];
static struct strbuf buffer = STRBUF_INIT;
int err = 0;
- args[0] = cmd;
- args[1] = prompt;
- args[2] = NULL;
+ strvec_push(&pass.args, cmd);
+ strvec_push(&pass.args, prompt);
- pass.argv = args;
pass.out = -1;
if (start_command(&pass))