[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241113130012.1370782-1-colin.i.king@gmail.com>
Date: Wed, 13 Nov 2024 13:00:12 +0000
From: Colin Ian King <colin.i.king@...il.com>
To: Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
linux-btrfs@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH][next] 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@...il.com>
---
fs/btrfs/send.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 7254279c3cc9..c5a318feb8ae 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -7253,7 +7253,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
@@ -7313,7 +7313,6 @@ static int changed_cb(struct btrfs_path *left_path,
return 0;
}
result = BTRFS_COMPARE_TREE_CHANGED;
- ret = 0;
}
sctx->left_path = left_path;
--
2.39.5
Powered by blists - more mailing lists