Skip to content

Commit

Permalink
ipv6: remove assignment in if condition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabian Frederick authored and David S. Miller committed Oct 30, 2014
1 parent fc08c25 commit 43728fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv6/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 43728fa

Please sign in to comment.