diff options
author | Ian Morris <ipm@chirality.org.uk> | 2015-04-03 04:17:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-03 12:11:15 -0400 |
commit | 51456b2914a34d16b1255b7c55d5cbf6a681d306 (patch) | |
tree | b8f1135150269f591105f787fbf7c7d8c2307d3e /net/ipv4/udp.c | |
parent | 11a9c7821c583aa22b35f37fba20539def9e8f14 (diff) |
ipv4: coding style: comparison for equality with NULL
The ipv4 code uses a mixture of coding styles. In some instances check
for NULL pointer is done as x == NULL and sometimes as !x. !x is
preferred according to checkpatch and this patch makes the code
consistent by adopting the latter form.
No changes detected by objdiff.
Signed-off-by: Ian Morris <ipm@chirality.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 294af16633af..9f525a2a68df 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -633,7 +633,7 @@ void __udp4_lib_err(struct sk_buff *skb, u32 info, struct udp_table *udptable) | |||
633 | 633 | ||
634 | sk = __udp4_lib_lookup(net, iph->daddr, uh->dest, | 634 | sk = __udp4_lib_lookup(net, iph->daddr, uh->dest, |
635 | iph->saddr, uh->source, skb->dev->ifindex, udptable); | 635 | iph->saddr, uh->source, skb->dev->ifindex, udptable); |
636 | if (sk == NULL) { | 636 | if (!sk) { |
637 | ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS); | 637 | ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS); |
638 | return; /* No socket for error */ | 638 | return; /* No socket for error */ |
639 | } | 639 | } |
@@ -1011,7 +1011,7 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) | |||
1011 | if (connected) | 1011 | if (connected) |
1012 | rt = (struct rtable *)sk_dst_check(sk, 0); | 1012 | rt = (struct rtable *)sk_dst_check(sk, 0); |
1013 | 1013 | ||
1014 | if (rt == NULL) { | 1014 | if (!rt) { |
1015 | struct net *net = sock_net(sk); | 1015 | struct net *net = sock_net(sk); |
1016 | 1016 | ||
1017 | fl4 = &fl4_stack; | 1017 | fl4 = &fl4_stack; |
@@ -1619,7 +1619,7 @@ static void flush_stack(struct sock **stack, unsigned int count, | |||
1619 | 1619 | ||
1620 | for (i = 0; i < count; i++) { | 1620 | for (i = 0; i < count; i++) { |
1621 | sk = stack[i]; | 1621 | sk = stack[i]; |
1622 | if (likely(skb1 == NULL)) | 1622 | if (likely(!skb1)) |
1623 | skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC); | 1623 | skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC); |
1624 | 1624 | ||
1625 | if (!skb1) { | 1625 | if (!skb1) { |