aboutsummaryrefslogtreecommitdiff
path: root/src/fe_utils/print.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-03-29 10:30:08 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-03-29 10:43:57 +0100
commita0ed19e0a9efe93b3b83d6e3fe8f77656be253a2 (patch)
tree8c1040a46a47098d3fe5199530576a1a68acc20f /src/fe_utils/print.c
parenta0a4601765b896079eb82a9d5cfa1f41154fcfdb (diff)
downloadpostgresql-a0ed19e0a9efe93b3b83d6e3fe8f77656be253a2.tar.gz
postgresql-a0ed19e0a9efe93b3b83d6e3fe8f77656be253a2.zip
Use PRI?64 instead of "ll?" in format strings (continued).
Continuation of work started in commit 15a79c73, after initial trial. Author: Thomas Munro <thomas.munro@gmail.com> Discussion: https://postgr.es/m/b936d2fb-590d-49c3-a615-92c3a88c6c19%40eisentraut.org
Diffstat (limited to 'src/fe_utils/print.c')
-rw-r--r--src/fe_utils/print.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fe_utils/print.c b/src/fe_utils/print.c
index 5e5e54e1b75..28d5bb0bd5d 100644
--- a/src/fe_utils/print.c
+++ b/src/fe_utils/print.c
@@ -3185,9 +3185,9 @@ printTableInit(printTableContent *const content, const printTableOpt *opt,
/* Catch possible overflow. Using >= here allows adding 1 below */
if (total_cells >= SIZE_MAX / sizeof(*content->cells))
{
- fprintf(stderr, _("Cannot print table contents: number of cells %lld is equal to or exceeds maximum %lld.\n"),
- (long long int) total_cells,
- (long long int) (SIZE_MAX / sizeof(*content->cells)));
+ fprintf(stderr, _("Cannot print table contents: number of cells %" PRId64 " is equal to or exceeds maximum %zu.\n"),
+ total_cells,
+ SIZE_MAX / sizeof(*content->cells));
exit(EXIT_FAILURE);
}
content->cells = pg_malloc0((total_cells + 1) * sizeof(*content->cells));
@@ -3269,8 +3269,8 @@ printTableAddCell(printTableContent *const content, char *cell,
total_cells = (uint64) content->ncolumns * content->nrows;
if (content->cellsadded >= total_cells)
{
- fprintf(stderr, _("Cannot add cell to table content: total cell count of %lld exceeded.\n"),
- (long long int) total_cells);
+ fprintf(stderr, _("Cannot add cell to table content: total cell count of %" PRId64 " exceeded.\n"),
+ total_cells);
exit(EXIT_FAILURE);
}