aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2024-11-13 13:00:12 +0000
committerDavid Sterba <dsterba@suse.com>2025-01-13 14:53:14 +0100
commitd0ad40d730ef30e51d3ec4e3b8c9b6691053354a (patch)
treefafb84f7bcbecf99fd2a704cf2c7abe31d445ff1
parentbtrfs: use PTR_ERR() instead of PTR_ERR_OR_ZERO() for btrfs_get_extent() (diff)
downloadwireguard-linux-d0ad40d730ef30e51d3ec4e3b8c9b6691053354a.tar.xz
wireguard-linux-d0ad40d730ef30e51d3ec4e3b8c9b6691053354a.zip
btrfs: send: remove redundant assignments to variable ret
The variable ret is being initialized to zero and also later re-assigned to zero. In both cases the assignment is redundant since the value is never read after the assignment and hence they can be removed. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/send.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 498c84323253..f437138fefbc 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -7259,7 +7259,7 @@ static int changed_cb(struct btrfs_path *left_path,
enum btrfs_compare_tree_result result,
struct send_ctx *sctx)
{
- int ret = 0;
+ int ret;
/*
* We can not hold the commit root semaphore here. This is because in
@@ -7319,7 +7319,6 @@ static int changed_cb(struct btrfs_path *left_path,
return 0;
}
result = BTRFS_COMPARE_TREE_CHANGED;
- ret = 0;
}
sctx->left_path = left_path;