]> granicus.if.org Git - postgresql/commitdiff
Fix comment
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 28 May 2019 12:26:24 +0000 (08:26 -0400)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 28 May 2019 12:26:24 +0000 (08:26 -0400)
This code block was copied/adapted from other similar places but
somehow the comment placement was changed so that it makes less sense.

src/bin/pg_checksums/pg_checksums.c

index 37fe20bb756c54e15618e7a3c6dff2cdecc5e9ac..16cf52a3408e3e68d4210895124d853f5f464b88 100644 (file)
@@ -136,16 +136,16 @@ progress_report(bool force)
        /* Calculate current percentage of size done */
        percent = total_size ? (int) ((current_size) * 100 / total_size) : 0;
 
-       snprintf(total_size_str, sizeof(total_size_str), INT64_FORMAT,
-                        total_size / (1024 * 1024));
-       snprintf(current_size_str, sizeof(current_size_str), INT64_FORMAT,
-                        current_size / (1024 * 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(total_size_str, sizeof(total_size_str), INT64_FORMAT,
+                        total_size / (1024 * 1024));
+       snprintf(current_size_str, sizeof(current_size_str), INT64_FORMAT,
+                        current_size / (1024 * 1024));
+
        fprintf(stderr, "%*s/%s MB (%d%%) computed",
                        (int) strlen(current_size_str), current_size_str, total_size_str,
                        percent);