Skip to content

Commit 6d0efd3

Browse files
committed
Surely this temp buffer needn't be static.
1 parent cbb7acf commit 6d0efd3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/bin/scripts/common.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.21 2006/09/22 18:50:41 petere Exp $
10+
* $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.22 2006/09/22 19:51:14 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -206,21 +206,23 @@ executeCommand(PGconn *conn, const char *query,
206206
bool
207207
yesno_prompt(const char *question)
208208
{
209-
static char prompt[128];
209+
char prompt[256];
210210

211211
for (;;)
212212
{
213213
char *resp;
214214

215215
/* translator: This is a question followed by the translated options for "yes" and "no". */
216-
snprintf(prompt, sizeof(prompt), _("%s (%s/%s) "), _(question), _(PG_YESLETTER), _(PG_NOLETTER));
216+
snprintf(prompt, sizeof(prompt), _("%s (%s/%s) "),
217+
_(question), _(PG_YESLETTER), _(PG_NOLETTER));
217218
resp = simple_prompt(prompt, 1, true);
218219

219220
if (strcmp(resp, _(PG_YESLETTER)) == 0)
220221
return true;
221222
else if (strcmp(resp, _(PG_NOLETTER)) == 0)
222223
return false;
223224

224-
printf(_("Please answer \"%s\" or \"%s\".\n"), _(PG_YESLETTER), _(PG_NOLETTER));
225+
printf(_("Please answer \"%s\" or \"%s\".\n"),
226+
_(PG_YESLETTER), _(PG_NOLETTER));
225227
}
226228
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy