Commit 588c6ea
bpf: Bail out early in __htab_map_lookup_and_delete_elem()
Use goto statement to bail out early when the target element is not
found, instead of using a large else branch to handle the more likely
case. This change doesn't affect functionality and simply make the code
cleaner.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Reviewed-by: Toke Høiland-Jørgensen <toke@kernel.org>
Link: https://lore.kernel.org/r/20250117101816.2101857-3-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>1 parent 45dc92c commit 588c6ea
1 file changed
+26
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1635 | 1635 | | |
1636 | 1636 | | |
1637 | 1637 | | |
1638 | | - | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
| 1638 | + | |
| 1639 | + | |
1643 | 1640 | | |
1644 | | - | |
1645 | | - | |
1646 | | - | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
1650 | | - | |
1651 | | - | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
1652 | 1645 | | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
1658 | | - | |
1659 | | - | |
1660 | | - | |
1661 | | - | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
1662 | 1651 | | |
| 1652 | + | |
| 1653 | + | |
1663 | 1654 | | |
1664 | | - | |
1665 | | - | |
1666 | | - | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
1667 | 1664 | | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
1668 | 1668 | | |
| 1669 | + | |
1669 | 1670 | | |
1670 | 1671 | | |
1671 | 1672 | | |
| |||
0 commit comments