summaryrefslogtreecommitdiff
path: root/net/ipv6/raw.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-10-29 12:57:51 +0100
committerDavid S. Miller <davem@davemloft.net>2014-10-30 15:51:43 -0400
commit43728fa5c5e475e6f0059ec739e715fc49e4a478 (patch)
tree3a173c6c96c18a71a62d422ad35bd053c8297b42 /net/ipv6/raw.c
parentfc08c258191f4acc79df232c0c65c857ee75e59f (diff)
downloadlwn-43728fa5c5e475e6f0059ec739e715fc49e4a478.tar.gz
lwn-43728fa5c5e475e6f0059ec739e715fc49e4a478.zip
ipv6: remove assignment in if condition
Do assignment before if condition and test !skb like in rawv6_recvmsg() Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r--net/ipv6/raw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 896af8807979..075a0fb400e7 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -548,7 +548,8 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
if (!rp->checksum)
goto send;
- if ((skb = skb_peek(&sk->sk_write_queue)) == NULL)
+ skb = skb_peek(&sk->sk_write_queue);
+ if (!skb)
goto out;
offset = rp->offset;