diff options
| author | Peter Eisentraut <peter@eisentraut.org> | 2021-09-15 09:19:01 +0200 |
|---|---|---|
| committer | Peter Eisentraut <peter@eisentraut.org> | 2021-09-15 09:19:01 +0200 |
| commit | e03b807e12bbb72d53ed53502dfb2c1e063e467c (patch) | |
| tree | eaf2b7dae7e45b0c876c3d42f69a890875ca3c6f /src/bin/pg_rewind | |
| parent | f7e56f1f540fbef204a03094b97ddfe908c44070 (diff) | |
| download | postgresql-e03b807e12bbb72d53ed53502dfb2c1e063e467c.tar.gz | |
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_rewind')
| -rw-r--r-- | src/bin/pg_rewind/pg_rewind.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 2ac4910778..69ea214337 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -759,14 +759,9 @@ progress_report(bool finished) if (fetch_done > fetch_size) fetch_size = fetch_done; - /* - * 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(fetch_done_str, sizeof(fetch_done_str), INT64_FORMAT, + snprintf(fetch_done_str, sizeof(fetch_done_str), UINT64_FORMAT, fetch_done / 1024); - snprintf(fetch_size_str, sizeof(fetch_size_str), INT64_FORMAT, + snprintf(fetch_size_str, sizeof(fetch_size_str), UINT64_FORMAT, fetch_size / 1024); fprintf(stderr, _("%*s/%s kB (%d%%) copied"), |
