aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorMinghao Chi2022-01-11 01:57:16 +0000
committerDavid Sterba2022-03-14 13:13:47 +0100
commit0292ecf19b353e255be93afa133955c3cd78f784 (patch)
treee604c38cb1dc8e148c5d7bcd9c258b8b2308b329 /fs
parentdb5df254120004471e1c957957ab2f1e612dcbd6 (diff)
btrfs: send: remove redundant ret variable in fs_path_copy
Return value from fs_path_add_path() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/send.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 2845febb711b..7d1642937274 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -528,17 +528,12 @@ out:
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);
}
-
static void fs_path_unreverse(struct fs_path *p)
{
char *tmp;