diff options
author | Tom Parkin <tparkin@katalix.com> | 2020-07-23 12:29:50 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-23 11:54:40 -0700 |
commit | 0febc7b3cd17bd2323a036356c2ae6514acf9010 (patch) | |
tree | f6ab4f820da4a733104e35cbf66134c0dd0ca07f /net/l2tp/l2tp_ip.c | |
parent | 49b0aa1b6585705de4a08971602cd2726d9027f0 (diff) | |
download | linux-0febc7b3cd17bd2323a036356c2ae6514acf9010.tar.gz linux-0febc7b3cd17bd2323a036356c2ae6514acf9010.tar.bz2 linux-0febc7b3cd17bd2323a036356c2ae6514acf9010.zip |
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>
Diffstat (limited to 'net/l2tp/l2tp_ip.c')
-rw-r--r-- | net/l2tp/l2tp_ip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c index 70f9fdaf6c86..d81564cf1e7f 100644 --- a/net/l2tp/l2tp_ip.c +++ b/net/l2tp/l2tp_ip.c @@ -471,7 +471,7 @@ static int l2tp_ip_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) rt = (struct rtable *)__sk_dst_check(sk, 0); rcu_read_lock(); - if (rt == NULL) { + if (!rt) { const struct ip_options_rcu *inet_opt; inet_opt = rcu_dereference(inet->inet_opt); |