btrfs-progs: send-stream: fix size types passed to read_buf
authorDavid Sterba <dsterba@suse.com>
Tue, 15 Nov 2016 13:19:30 +0000 (14:19 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 23 Nov 2016 09:49:49 +0000 (10:49 +0100)
Signed-off-by: David Sterba <dsterba@suse.com>
send-stream.c

index 5d36530daecc41039d25a4ef7dbd94e52b2f1489..7b64dc221b6c2d08b9d3f3e7d259b4a8381e4e26 100644 (file)
@@ -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);