mlxsw: spectrum_router: Simplify a piece of code
Express the same logic more succinctly. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
56b8a9ed27
commit
213666a356
@ -1752,9 +1752,9 @@ set_trap:
|
||||
static void __mlxsw_sp_nexthop_neigh_update(struct mlxsw_sp_nexthop *nh,
|
||||
bool removing)
|
||||
{
|
||||
if (!removing && !nh->should_offload)
|
||||
if (!removing)
|
||||
nh->should_offload = 1;
|
||||
else if (removing && nh->offloaded)
|
||||
else if (nh->offloaded)
|
||||
nh->should_offload = 0;
|
||||
nh->update = 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user