ipv6: remove assignment in if condition
authorFabian Frederick <fabf@skynet.be>
Wed, 29 Oct 2014 11:57:51 +0000 (12:57 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Oct 2014 19:51:43 +0000 (15:51 -0400)
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>
net/ipv6/raw.c

index 896af8807979fad382ba65724ccad0bf040c992f..075a0fb400e72c686707feea2ecd00074c25bbc0 100644 (file)
@@ -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;