Skip to content

Commit

Permalink
btrfs: send: remove redundant ret variable in fs_path_copy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Minghao Chi authored and David Sterba committed Mar 14, 2022
1 parent db5df25 commit 0292ecf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fs/btrfs/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,17 +528,12 @@ 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);
}


static void fs_path_unreverse(struct fs_path *p)
{
char *tmp;
Expand Down

0 comments on commit 0292ecf

Please sign in to comment.