diff options
author | David Sterba <dsterba@suse.com> | 2016-11-15 14:26:44 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-11-23 10:49:51 +0100 |
commit | d63854d1b617a9206efaa2d8a60669bea9c16737 (patch) | |
tree | afa5734b70630a313aab8af9e32d7e623b456cdb /send-stream.c | |
parent | 194666a67290a0b15224598826f487d2ce4d37b0 (diff) |
btrfs-progs: send-stream: pass char buffer to read_buf
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'send-stream.c')
-rw-r--r-- | send-stream.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/send-stream.c b/send-stream.c index 7b64dc22..502e43ec 100644 --- a/send-stream.c +++ b/send-stream.c @@ -37,13 +37,13 @@ struct btrfs_send_stream { void *user; }; -static int read_buf(struct btrfs_send_stream *sctx, void *buf, size_t len) +static int read_buf(struct btrfs_send_stream *sctx, char *buf, size_t len) { int ret; size_t pos = 0; while (pos < len) { - ret = read(sctx->fd, (char*)buf + pos, len - pos); + ret = read(sctx->fd, buf + pos, len - pos); if (ret < 0) { ret = -errno; error("read from stream failed: %s", @@ -452,7 +452,7 @@ int btrfs_read_and_process_send_stream(int fd, sctx.ops = ops; sctx.user = user; - ret = read_buf(&sctx, &hdr, sizeof(hdr)); + ret = read_buf(&sctx, (char*)&hdr, sizeof(hdr)); if (ret < 0) goto out; if (ret) { |