aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorIan Morris <ipm@chirality.org.uk>2015-03-29 09:00:05 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-31 13:51:54 -0400
commit53b24b8f94cb15e38e332db82177cf3f0f4df0c5 (patch)
treec314553dc093f5226913a247c36c03012f7d22d7 /net/ipv6/tcp_ipv6.c
parent63159f29be1df7f93563a8a0f78c5e65fc844ed6 (diff)
ipv6: coding style: comparison for inequality with NULL
The ipv6 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/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index a8a74d36d893..7cdad8401434 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -460,7 +460,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst,
460 &ireq->ir_v6_rmt_addr); 460 &ireq->ir_v6_rmt_addr);
461 461
462 fl6->daddr = ireq->ir_v6_rmt_addr; 462 fl6->daddr = ireq->ir_v6_rmt_addr;
463 if (np->repflow && (ireq->pktopts != NULL)) 463 if (np->repflow && ireq->pktopts)
464 fl6->flowlabel = ip6_flowlabel(ipv6_hdr(ireq->pktopts)); 464 fl6->flowlabel = ip6_flowlabel(ipv6_hdr(ireq->pktopts));
465 465
466 skb_set_queue_mapping(skb, queue_mapping); 466 skb_set_queue_mapping(skb, queue_mapping);
@@ -1107,7 +1107,7 @@ static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1107 1107
1108 /* Clone pktoptions received with SYN */ 1108 /* Clone pktoptions received with SYN */
1109 newnp->pktoptions = NULL; 1109 newnp->pktoptions = NULL;
1110 if (ireq->pktopts != NULL) { 1110 if (ireq->pktopts) {
1111 newnp->pktoptions = skb_clone(ireq->pktopts, 1111 newnp->pktoptions = skb_clone(ireq->pktopts,
1112 sk_gfp_atomic(sk, GFP_ATOMIC)); 1112 sk_gfp_atomic(sk, GFP_ATOMIC));
1113 consume_skb(ireq->pktopts); 1113 consume_skb(ireq->pktopts);
@@ -1152,7 +1152,7 @@ static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
1152#ifdef CONFIG_TCP_MD5SIG 1152#ifdef CONFIG_TCP_MD5SIG
1153 /* Copy over the MD5 key from the original socket */ 1153 /* Copy over the MD5 key from the original socket */
1154 key = tcp_v6_md5_do_lookup(sk, &newsk->sk_v6_daddr); 1154 key = tcp_v6_md5_do_lookup(sk, &newsk->sk_v6_daddr);
1155 if (key != NULL) { 1155 if (key) {
1156 /* We're using one, so create a matching key 1156 /* We're using one, so create a matching key
1157 * on the newsk structure. If we fail to get 1157 * on the newsk structure. If we fail to get
1158 * memory, then we end up not copying the key 1158 * memory, then we end up not copying the key
@@ -1475,7 +1475,7 @@ do_time_wait:
1475 &ipv6_hdr(skb)->saddr, th->source, 1475 &ipv6_hdr(skb)->saddr, th->source,
1476 &ipv6_hdr(skb)->daddr, 1476 &ipv6_hdr(skb)->daddr,
1477 ntohs(th->dest), tcp_v6_iif(skb)); 1477 ntohs(th->dest), tcp_v6_iif(skb));
1478 if (sk2 != NULL) { 1478 if (sk2) {
1479 struct inet_timewait_sock *tw = inet_twsk(sk); 1479 struct inet_timewait_sock *tw = inet_twsk(sk);
1480 inet_twsk_deschedule(tw, &tcp_death_row); 1480 inet_twsk_deschedule(tw, &tcp_death_row);
1481 inet_twsk_put(tw); 1481 inet_twsk_put(tw);