Skip to content

Commit a94fd13

Browse files
committed
Fix comment
This code block was copied/adapted from other similar places but somehow the comment placement was changed so that it makes less sense.
1 parent 3ceaed1 commit a94fd13

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bin/pg_checksums/pg_checksums.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,16 @@ progress_report(bool force)
136136
/* Calculate current percentage of size done */
137137
percent = total_size ? (int) ((current_size) * 100 / total_size) : 0;
138138

139-
snprintf(total_size_str, sizeof(total_size_str), INT64_FORMAT,
140-
total_size / (1024 * 1024));
141-
snprintf(current_size_str, sizeof(current_size_str), INT64_FORMAT,
142-
current_size / (1024 * 1024));
143-
144139
/*
145140
* Separate step to keep platform-dependent format code out of
146141
* translatable strings. And we only test for INT64_FORMAT availability
147142
* in snprintf, not fprintf.
148143
*/
144+
snprintf(total_size_str, sizeof(total_size_str), INT64_FORMAT,
145+
total_size / (1024 * 1024));
146+
snprintf(current_size_str, sizeof(current_size_str), INT64_FORMAT,
147+
current_size / (1024 * 1024));
148+
149149
fprintf(stderr, "%*s/%s MB (%d%%) computed",
150150
(int) strlen(current_size_str), current_size_str, total_size_str,
151151
percent);

0 commit comments

Comments
 (0)