Ver Fonte

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>
Fabian Frederick há 11 anos atrás
pai
commit
43728fa5c5
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      net/ipv6/raw.c

+ 2 - 1
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;