lkml.org 
[lkml]   [2021]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 2/2] net: ipv4: route.c: Remove unnecessary if()
    From
    Date
    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 <yejune.deng@gmail.com>
    > ---
    > net/ipv4/route.c | 16 ++++++----------
    > 1 file changed, 6 insertions(+), 10 deletions(-)
    >


    Reviewed-by: David Ahern <dsahern@kernel.org>

    \
     
     \ /
      Last update: 2021-03-25 15:38    [W:3.273 / U:0.712 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site