v1-0006-Clean-up-copy_file_range-return-type.patch

text/plain

Filename: v1-0006-Clean-up-copy_file_range-return-type.patch
Type: text/plain
Part: 5
Message: clean up size_t/ssize_t use with POSIX file system APIs

Patch

Format: format-patch
Series: patch v1-0006
Subject: Clean up copy_file_range() return type
File+
src/bin/pg_combinebackup/reconstruct.c 1 1
From 515b1e20a9fa2a56008cab080936469674590279 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Mon, 29 Jun 2026 13:37:54 +0200
Subject: [PATCH v1 06/15] Clean up copy_file_range() return type

The return type is ssize_t, not int.  Fix that in one instance; the
others were already okay.
---
 src/bin/pg_combinebackup/reconstruct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/pg_combinebackup/reconstruct.c b/src/bin/pg_combinebackup/reconstruct.c
index 73b38236481..7f76b532588 100644
--- a/src/bin/pg_combinebackup/reconstruct.c
+++ b/src/bin/pg_combinebackup/reconstruct.c
@@ -698,7 +698,7 @@ write_reconstructed_file(const char *input_filename,
 			 */
 			do
 			{
-				int			wb;
+				ssize_t		wb;
 
 				wb = copy_file_range(s->fd, &off, wfd, NULL, BLCKSZ - nwritten, 0);
 
-- 
2.54.0