btrfs-progs: send-stream: fix size types passed to read_buf

Signed-off-by: David Sterba <dsterba@suse.com>
master
David Sterba 2016-11-15 14:19:30 +01:00
parent 7b794974ba
commit 194666a672
1 changed files with 2 additions and 2 deletions

View 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);