Re: [PATCH 2/2] net: ipv4: route.c: Remove unnecessary if()

2021-03-25 Thread David Ahern
On 3/23/21 9:10 PM, Yejune Deng wrote: > negative_advice handler is only called when dst is non-NULL hence the > 'if (rt)' check can be removed. 'if' and 'else if' can be merged together. > And use container_of() instead of (struct rtable *). > > Signed-off-by: Yejune Deng > --- > net/ipv4/route

[PATCH 2/2] net: ipv4: route.c: Remove unnecessary if()

2021-03-23 Thread Yejune Deng
negative_advice handler is only called when dst is non-NULL hence the 'if (rt)' check can be removed. 'if' and 'else if' can be merged together. And use container_of() instead of (struct rtable *). Signed-off-by: Yejune Deng --- net/ipv4/route.c | 16 ++-- 1 file changed, 6 insertion