]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: send: remove redundant assignments to variable ret
authorColin Ian King <colin.i.king@gmail.com>
Wed, 13 Nov 2024 13:00:12 +0000 (13:00 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:14 +0000 (14:53 +0100)
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>
fs/btrfs/send.c

index 498c8432325369c5d188fef4aa69c3767e3edf01..f437138fefbc5bc20c2149a2c1a982b5bf52f2a4 100644 (file)
@@ -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;