Skip to contentSkip to conversation

fs/btrfs: remove redundant ret variable

PATCH In review [email protected] 3 participants 3 messages Jan 11, 2022 – Jan 24, 2022 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/btrfs: remove redundant ret variable

From: Minghao Chi <[email protected]>

Return value from fs_path_add_path() directly instead of taking this in another redundant variable.

---
 fs/btrfs/send.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
fs/btrfs/send.c +1 -5
index 3fc144b8c0d8..4ed13461cb07 100644
@@ -528,14 +528,10 @@ static int fs_path_add_from_extent_buffer(struct fs_path *p,
 
 static int fs_path_copy(struct fs_path *p, struct fs_path *from)
 {
-	int ret;
-
 	p->reversed = from->reversed;
 	fs_path_reset(p);
 
-	ret = fs_path_add_path(p, from);
-
-	return ret;
+	return fs_path_add_path(p, from);
 }
 
 
Signature · 1 line
2.25.1