[CRIU] [PATCH 04/16] mem/page-pipe: Use ssize_t for splice/tee results
Mike Rapoport
rppt at linux.ibm.com
Mon Jul 8 15:34:34 MSK 2019
On Fri, Jul 05, 2019 at 06:37:59PM +0300, Cyrill Gorcunov wrote:
> Integer value is too short.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
Reviewed-by: Mike Rapoport <rppt at linux.ibm.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
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
>
--
Sincerely yours,
Mike.
More information about the CRIU
mailing list