From: Fabian Frederick Date: Wed, 29 Oct 2014 11:57:51 +0000 (+0100) Subject: ipv6: remove assignment in if condition X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=43728fa5c5e475e6f0059ec739e715fc49e4a478;p=linux.git ipv6: remove assignment in if condition Do assignment before if condition and test !skb like in rawv6_recvmsg() Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller --- diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 896af8807979f..075a0fb400e72 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;