Commit 10de00c
btrfs: remove unnecessary btrfs_key local variable in btrfs_search_forward()
The 'found_key' variable was only used to temporarily store the found key
before copying it to 'min_key' at the end of the function when returning
success.
Eliminate the 'found_key' variable, and directly store the key into
'min_key' at the exact loop exit points where ret=0 is set, maintaining
identical functionality.
Signed-off-by: Sun YangKai <sunk67188@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 140ac52 commit 10de00c
1 file changed
+5
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4607 | 4607 | | |
4608 | 4608 | | |
4609 | 4609 | | |
4610 | | - | |
4611 | 4610 | | |
4612 | 4611 | | |
4613 | 4612 | | |
| |||
4643 | 4642 | | |
4644 | 4643 | | |
4645 | 4644 | | |
4646 | | - | |
| 4645 | + | |
| 4646 | + | |
4647 | 4647 | | |
4648 | 4648 | | |
4649 | 4649 | | |
| |||
4678 | 4678 | | |
4679 | 4679 | | |
4680 | 4680 | | |
4681 | | - | |
4682 | | - | |
4683 | 4681 | | |
4684 | 4682 | | |
4685 | 4683 | | |
| 4684 | + | |
| 4685 | + | |
4686 | 4686 | | |
4687 | 4687 | | |
4688 | 4688 | | |
| |||
4699 | 4699 | | |
4700 | 4700 | | |
4701 | 4701 | | |
4702 | | - | |
| 4702 | + | |
4703 | 4703 | | |
4704 | | - | |
4705 | | - | |
4706 | 4704 | | |
4707 | 4705 | | |
4708 | 4706 | | |
| |||
0 commit comments