From 194666a67290a0b15224598826f487d2ce4d37b0 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 15 Nov 2016 14:19:30 +0100 Subject: [PATCH] btrfs-progs: send-stream: fix size types passed to read_buf Signed-off-by: David Sterba --- send-stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/send-stream.c b/send-stream.c index 5d36530d..7b64dc22 100644 --- a/send-stream.c +++ b/send-stream.c @@ -37,10 +37,10 @@ struct btrfs_send_stream { void *user; }; -static int read_buf(struct btrfs_send_stream *sctx, void *buf, int len) +static int read_buf(struct btrfs_send_stream *sctx, void *buf, size_t len) { int ret; - int pos = 0; + size_t pos = 0; while (pos < len) { ret = read(sctx->fd, (char*)buf + pos, len - pos);