summaryrefslogtreecommitdiff
path: root/src/bin/pg_basebackup/pg_basebackup.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2021-09-15 09:19:01 +0200
committerPeter Eisentraut <peter@eisentraut.org>2021-09-15 09:19:01 +0200
commite03b807e12bbb72d53ed53502dfb2c1e063e467c (patch)
treeeaf2b7dae7e45b0c876c3d42f69a890875ca3c6f /src/bin/pg_basebackup/pg_basebackup.c
parentf7e56f1f540fbef204a03094b97ddfe908c44070 (diff)
Fix incorrect format placeholders
Also remove obsolete comments about why the 64-bit integers need to be printed in a separate buffer. The reason used to be portability, but now the remaining reason is that we need the string lengths for the progress displays. That is evident by looking at the code right below, so a new comment doesn't seem necessary.
Diffstat (limited to 'src/bin/pg_basebackup/pg_basebackup.c')
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 7296eb97d01..669aa207a3c 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -804,14 +804,9 @@ progress_report(int tablespacenum, const char *filename,
if (totaldone / 1024 > totalsize_kb)
totalsize_kb = totaldone / 1024;
- /*
- * Separate step to keep platform-dependent format code out of
- * translatable strings. And we only test for INT64_FORMAT availability
- * in snprintf, not fprintf.
- */
- snprintf(totaldone_str, sizeof(totaldone_str), INT64_FORMAT,
+ snprintf(totaldone_str, sizeof(totaldone_str), UINT64_FORMAT,
totaldone / 1024);
- snprintf(totalsize_str, sizeof(totalsize_str), INT64_FORMAT, totalsize_kb);
+ snprintf(totalsize_str, sizeof(totalsize_str), UINT64_FORMAT, totalsize_kb);
#define VERBOSE_FILENAME_LENGTH 35
if (verbose)