From 863d75439e8733b4bf6195a2c8a09966f04d8fbe Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 4 Sep 2017 11:08:52 +0200 Subject: [PATCH] Fix translatable string Discussion: https://postgr.es/m/20170828130545.sdajqlpr37hmmd6a@alvherre.pgsql --- src/bin/pg_rewind/libpq_fetch.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c index a6ff4e3817..0cdff55cab 100644 --- a/src/bin/pg_rewind/libpq_fetch.c +++ b/src/bin/pg_rewind/libpq_fetch.c @@ -270,6 +270,7 @@ receiveFileChunks(const char *sql) char *filename; int filenamelen; int64 chunkoff; + char chunkoff_str[32]; int chunksize; char *chunk; @@ -342,8 +343,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); -- 2.40.0