diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-06-04 19:17:39 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-06-04 19:17:39 +0000 |
commit | 0d5478196ad4e10ca182a10f85b8da6868e39b4a (patch) | |
tree | 23e463ccbcf2e8a585361ad6b9a53e2b23d3747a /src | |
parent | 20d4005c306eaaaf3e0a61d9d7ab369a91f81ed1 (diff) | |
download | postgresql-0d5478196ad4e10ca182a10f85b8da6868e39b4a.tar.gz postgresql-0d5478196ad4e10ca182a10f85b8da6868e39b4a.zip |
Trivial code style cleanup around a couple of ngettext calls.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/describe.c | 7 | ||||
-rw-r--r-- | src/bin/psql/print.c | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 2c0cd2260e0..38c9355cc82 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -8,7 +8,7 @@ * * Copyright (c) 2000-2009, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.213 2009/05/27 20:47:55 petere Exp $ + * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.214 2009/06/04 19:17:39 tgl Exp $ */ #include "postgres_fe.h" @@ -2036,7 +2036,10 @@ describeRoles(const char *pattern, bool verbose) if (conns == 0) appendPQExpBuffer(&buf, _("No connections")); else - appendPQExpBuffer(&buf, ngettext("%d connection", "%d connections", conns), conns); + appendPQExpBuffer(&buf, ngettext("%d connection", + "%d connections", + conns), + conns); } attr[i] = pg_strdup(buf.data); diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c index fd869c65524..3a6f5372acf 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2009, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.113 2009/05/27 20:47:55 petere Exp $ + * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.114 2009/06/04 19:17:39 tgl Exp $ */ #include "postgres_fe.h" @@ -2348,7 +2348,9 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout, FILE *f char default_footer[100]; total_records = opt->topt.prior_records + cont.nrows; - snprintf(default_footer, 100, ngettext("(%lu row)", "(%lu rows)", total_records), total_records); + snprintf(default_footer, sizeof(default_footer), + ngettext("(%lu row)", "(%lu rows)", total_records), + total_records); printTableAddFooter(&cont, default_footer); } |