]> granicus.if.org Git - postgresql/commitdiff
Fix translatable string
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 4 Sep 2017 09:08:52 +0000 (11:08 +0200)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 4 Sep 2017 09:09:51 +0000 (11:09 +0200)
Discussion: https://postgr.es/m/20170828130545.sdajqlpr37hmmd6a@alvherre.pgsql

src/bin/pg_rewind/libpq_fetch.c

index e90907bd3802e3c66fcae866f987fedeaafec8f7..189853b3f14f37121679dfc3fb222ac37ecb0c6e 100644 (file)
@@ -271,6 +271,7 @@ receiveFileChunks(const char *sql)
                char       *filename;
                int                     filenamelen;
                int64           chunkoff;
+               char            chunkoff_str[32];
                int                     chunksize;
                char       *chunk;
 
@@ -343,8 +344,13 @@ receiveFileChunks(const char *sql)
                        continue;
                }
 
-               pg_log(PG_DEBUG, "received chunk for file \"%s\", offset " INT64_FORMAT ", size %d\n",
-                          filename, chunkoff, chunksize);
+               /*
+                * Separate step to keep platform-dependent format code out of
+                * translatable strings.
+                */
+               snprintf(chunkoff_str, sizeof(chunkoff_str), INT64_FORMAT, chunkoff);
+               pg_log(PG_DEBUG, "received chunk for file \"%s\", offset %s, size %d\n",
+                          filename, chunkoff_str, chunksize);
 
                open_target_file(filename, false);