aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorIan Morris <ipm@chirality.org.uk>2015-04-03 04:17:26 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-03 12:11:15 -0400
commit51456b2914a34d16b1255b7c55d5cbf6a681d306 (patch)
treeb8f1135150269f591105f787fbf7c7d8c2307d3e /net/ipv4/tcp_ipv4.c
parent11a9c7821c583aa22b35f37fba20539def9e8f14 (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/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 69f9cf684744..9ff311cf00f3 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -122,7 +122,7 @@ int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp)
122 and use initial timestamp retrieved from peer table. 122 and use initial timestamp retrieved from peer table.
123 */ 123 */
124 if (tcptw->tw_ts_recent_stamp && 124 if (tcptw->tw_ts_recent_stamp &&
125 (twp == NULL || (sysctl_tcp_tw_reuse && 125 (!twp || (sysctl_tcp_tw_reuse &&
126 get_seconds() - tcptw->tw_ts_recent_stamp > 1))) { 126 get_seconds() - tcptw->tw_ts_recent_stamp > 1))) {
127 tp->write_seq = tcptw->tw_snd_nxt + 65535 + 2; 127 tp->write_seq = tcptw->tw_snd_nxt + 65535 + 2;
128 if (tp->write_seq == 0) 128 if (tp->write_seq == 0)
@@ -494,7 +494,7 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
494 /* Only in fast or simultaneous open. If a fast open socket is 494 /* Only in fast or simultaneous open. If a fast open socket is
495 * is already accepted it is treated as a connected one below. 495 * is already accepted it is treated as a connected one below.
496 */ 496 */
497 if (fastopen && fastopen->sk == NULL) 497 if (fastopen && !fastopen->sk)
498 break; 498 break;
499 499
500 if (!sock_owned_by_user(sk)) { 500 if (!sock_owned_by_user(sk)) {
@@ -1390,7 +1390,7 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
1390 sk_mark_napi_id(sk, skb); 1390 sk_mark_napi_id(sk, skb);
1391 if (dst) { 1391 if (dst) {
1392 if (inet_sk(sk)->rx_dst_ifindex != skb->skb_iif || 1392 if (inet_sk(sk)->rx_dst_ifindex != skb->skb_iif ||
1393 dst->ops->check(dst, 0) == NULL) { 1393 !dst->ops->check(dst, 0)) {
1394 dst_release(dst); 1394 dst_release(dst);
1395 sk->sk_rx_dst = NULL; 1395 sk->sk_rx_dst = NULL;
1396 } 1396 }