[CRIU] [PATCH 04/16] mem/page-pipe: Use ssize_t for splice/tee results

Cyrill Gorcunov gorcunov at gmail.com
Fri Jul 5 18:37:59 MSK 2019


Integer value is too short.

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 criu/page-pipe.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/criu/page-pipe.c b/criu/page-pipe.c
index 32be2f9812e2..534380b0f1ce 100644
--- a/criu/page-pipe.c
+++ b/criu/page-pipe.c
@@ -389,7 +389,7 @@ int page_pipe_read(struct page_pipe *pp, struct pipe_read_dest *prd,
 	struct page_pipe_buf *ppb;
 	struct iovec *iov = NULL;
 	unsigned long skip = 0, len;
-	int ret;
+	ssize_t ret;
 
 	/*
 	 * Get ppb that contains addr and count length of data between
@@ -418,13 +418,13 @@ int page_pipe_read(struct page_pipe *pp, struct pipe_read_dest *prd,
 
 	ret = tee(ppb->p[0], prd->p[1], len, 0);
 	if (ret != len) {
-		pr_perror("tee: %d", ret);
+		pr_perror("tee: %zd", ret);
 		return -1;
 	}
 
 	ret = splice(prd->p[0], NULL, prd->sink_fd, NULL, skip, 0);
 	if (ret != skip) {
-		pr_perror("splice: %d", ret);
+		pr_perror("splice: %zd", ret);
 		return -1;
 	}
 
-- 
2.20.1



More information about the CRIU mailing list