From 063de8336f6a9012e0233470e884f4fba289ac92 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 4 Jun 2009 19:17:39 +0000 Subject: [PATCH] Trivial code style cleanup around a couple of ngettext calls. --- src/bin/psql/describe.c | 5 ++++- src/bin/psql/print.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 7e542b0709..5f54431393 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -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 e2315a8262..59aaa0204c 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -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); } -- 2.39.5