summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-11-02 14:07:53 +0100
committerDavid Sterba <dsterba@suse.com>2016-11-09 13:47:31 +0100
commita9f407b9a642cc99f1117c263e1cd05b5eb4a729 (patch)
tree59184449960d3e65ef3d9554a237d56e251e1b5c
parentf3a00c630a8f3b4ca41727e4b05fef507fc0cf0f (diff)
btrfs-progs: send: cleanup, rename some variables in dump_thread
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--cmds-send.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/cmds-send.c b/cmds-send.c
index 5fe87899..0c33298a 100644
--- a/cmds-send.c
+++ b/cmds-send.c
@@ -222,16 +222,16 @@ out:
return ret;
}
-static void *dump_thread(void *arg_)
+static void *dump_thread(void *arg)
{
int ret;
- struct btrfs_send *s = (struct btrfs_send*)arg_;
+ struct btrfs_send *sctx = (struct btrfs_send*)arg;
char buf[SEND_BUFFER_SIZE];
while (1) {
ssize_t rbytes;
- rbytes = read(s->send_fd, buf, sizeof(buf));
+ rbytes = read(sctx->send_fd, buf, sizeof(buf));
if (rbytes < 0) {
ret = -errno;
error("failed to read stream from kernel: %s\n",
@@ -242,15 +242,14 @@ static void *dump_thread(void *arg_)
ret = 0;
goto out;
}
- ret = write_buf(s->dump_fd, buf, rbytes);
+ ret = write_buf(sctx->dump_fd, buf, rbytes);
if (ret < 0)
goto out;
}
out:
- if (ret < 0) {
+ if (ret < 0)
exit(-ret);
- }
return ERR_PTR(ret);
}