l2tp: cleanup comparisons to NULL

checkpatch warns about comparisons to NULL, e.g.

        CHECK: Comparison to NULL could be written "!rt"
        #474: FILE: net/l2tp/l2tp_ip.c:474:
        +       if (rt == NULL) {

These sort of comparisons are generally clearer and more readable
the way checkpatch suggests, so update l2tp accordingly.

Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tom Parkin
2020-07-23 12:29:50 +01:00
committed by David S. Miller
parent 49b0aa1b65
commit 0febc7b3cd
6 changed files with 47 additions and 48 deletions

View File

@@ -486,7 +486,7 @@ static int l2tp_ip6_push_pending_frames(struct sock *sk)
int err = 0;
skb = skb_peek(&sk->sk_write_queue);
if (skb == NULL)
if (!skb)
goto out;
transhdr = (__be32 *)skb_transport_header(skb);