Skip to content

Commit 0d54781

Browse files
committed
Trivial code style cleanup around a couple of ngettext calls.
1 parent 20d4005 commit 0d54781

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/bin/psql/describe.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
1010
*
11-
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.213 2009/05/27 20:47:55 petere Exp $
11+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.214 2009/06/04 19:17:39 tgl Exp $
1212
*/
1313
#include "postgres_fe.h"
1414

@@ -2036,7 +2036,10 @@ describeRoles(const char *pattern, bool verbose)
20362036
if (conns == 0)
20372037
appendPQExpBuffer(&buf, _("No connections"));
20382038
else
2039-
appendPQExpBuffer(&buf, ngettext("%d connection", "%d connections", conns), conns);
2039+
appendPQExpBuffer(&buf, ngettext("%d connection",
2040+
"%d connections",
2041+
conns),
2042+
conns);
20402043
}
20412044

20422045
attr[i] = pg_strdup(buf.data);

src/bin/psql/print.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.113 2009/05/27 20:47:55 petere Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.114 2009/06/04 19:17:39 tgl Exp $
77
*/
88
#include "postgres_fe.h"
99

@@ -2348,7 +2348,9 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout, FILE *f
23482348
char default_footer[100];
23492349

23502350
total_records = opt->topt.prior_records + cont.nrows;
2351-
snprintf(default_footer, 100, ngettext("(%lu row)", "(%lu rows)", total_records), total_records);
2351+
snprintf(default_footer, sizeof(default_footer),
2352+
ngettext("(%lu row)", "(%lu rows)", total_records),
2353+
total_records);
23522354

23532355
printTableAddFooter(&cont, default_footer);
23542356
}

0 commit comments

Comments
 (0)