diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index cbdf6912d2c6..a8a74d36d893 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -141,7 +141,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
141 | if (fl6.flowlabel&IPV6_FLOWLABEL_MASK) { | 141 | if (fl6.flowlabel&IPV6_FLOWLABEL_MASK) { |
142 | struct ip6_flowlabel *flowlabel; | 142 | struct ip6_flowlabel *flowlabel; |
143 | flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); | 143 | flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); |
144 | if (flowlabel == NULL) | 144 | if (!flowlabel) |
145 | return -EINVAL; | 145 | return -EINVAL; |
146 | fl6_sock_release(flowlabel); | 146 | fl6_sock_release(flowlabel); |
147 | } | 147 | } |
@@ -247,7 +247,7 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
247 | goto failure; | 247 | goto failure; |
248 | } | 248 | } |
249 | 249 | ||
250 | if (saddr == NULL) { | 250 | if (!saddr) { |
251 | saddr = &fl6.saddr; | 251 | saddr = &fl6.saddr; |
252 | sk->sk_v6_rcv_saddr = *saddr; | 252 | sk->sk_v6_rcv_saddr = *saddr; |
253 | } | 253 | } |
@@ -412,7 +412,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
412 | /* Only in fast or simultaneous open. If a fast open socket is | 412 | /* Only in fast or simultaneous open. If a fast open socket is |
413 | * is already accepted it is treated as a connected one below. | 413 | * is already accepted it is treated as a connected one below. |
414 | */ | 414 | */ |
415 | if (fastopen && fastopen->sk == NULL) | 415 | if (fastopen && !fastopen->sk) |
416 | break; | 416 | break; |
417 | 417 | ||
418 | if (!sock_owned_by_user(sk)) { | 418 | if (!sock_owned_by_user(sk)) { |
@@ -750,7 +750,7 @@ static void tcp_v6_send_response(struct sock *sk, struct sk_buff *skb, u32 seq, | |||
750 | 750 | ||
751 | buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len, | 751 | buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len, |
752 | GFP_ATOMIC); | 752 | GFP_ATOMIC); |
753 | if (buff == NULL) | 753 | if (!buff) |
754 | return; | 754 | return; |
755 | 755 | ||
756 | skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len); | 756 | skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len); |
@@ -1008,7 +1008,7 @@ static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1008 | 1008 | ||
1009 | newsk = tcp_v4_syn_recv_sock(sk, skb, req, dst); | 1009 | newsk = tcp_v4_syn_recv_sock(sk, skb, req, dst); |
1010 | 1010 | ||
1011 | if (newsk == NULL) | 1011 | if (!newsk) |
1012 | return NULL; | 1012 | return NULL; |
1013 | 1013 | ||
1014 | newtcp6sk = (struct tcp6_sock *)newsk; | 1014 | newtcp6sk = (struct tcp6_sock *)newsk; |
@@ -1065,7 +1065,7 @@ static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | newsk = tcp_create_openreq_child(sk, req, skb); | 1067 | newsk = tcp_create_openreq_child(sk, req, skb); |
1068 | if (newsk == NULL) | 1068 | if (!newsk) |
1069 | goto out_nonewsk; | 1069 | goto out_nonewsk; |
1070 | 1070 | ||
1071 | /* | 1071 | /* |