diff options
| author | Tom Lane | 2006-09-22 19:51:14 +0000 |
|---|---|---|
| committer | Tom Lane | 2006-09-22 19:51:14 +0000 |
| commit | 1ab048fe5c0d252df9c796f2e8daedab1113d9fb (patch) | |
| tree | 2704df69d342986810002965f8aa5a05d229cec0 /src/bin/scripts/common.c | |
| parent | 8cdd997ec9ba373c9df84624c62936a69387fe36 (diff) | |
Surely this temp buffer needn't be static.
Diffstat (limited to 'src/bin/scripts/common.c')
| -rw-r--r-- | src/bin/scripts/common.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/scripts/common.c b/src/bin/scripts/common.c index 4b5f94b895..3eb972a8a6 100644 --- a/src/bin/scripts/common.c +++ b/src/bin/scripts/common.c @@ -206,14 +206,15 @@ executeCommand(PGconn *conn, const char *query, bool yesno_prompt(const char *question) { - static char prompt[128]; + char prompt[256]; for (;;) { char *resp; /* translator: This is a question followed by the translated options for "yes" and "no". */ - snprintf(prompt, sizeof(prompt), _("%s (%s/%s) "), _(question), _(PG_YESLETTER), _(PG_NOLETTER)); + snprintf(prompt, sizeof(prompt), _("%s (%s/%s) "), + _(question), _(PG_YESLETTER), _(PG_NOLETTER)); resp = simple_prompt(prompt, 1, true); if (strcmp(resp, _(PG_YESLETTER)) == 0) @@ -221,6 +222,7 @@ yesno_prompt(const char *question) else if (strcmp(resp, _(PG_NOLETTER)) == 0) return false; - printf(_("Please answer \"%s\" or \"%s\".\n"), _(PG_YESLETTER), _(PG_NOLETTER)); + printf(_("Please answer \"%s\" or \"%s\".\n"), + _(PG_YESLETTER), _(PG_NOLETTER)); } } |
