mirror of
https://github.com/torvalds/linux.git
synced 2024-12-18 09:02:17 +00:00
RDMA/nes: Rewrite expression to avoid undefined semantics
Change code like x = expr(++x) that assigns to x twice without a sequence point in between to the intended (and well-defined) x = expr(x + 1) Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
589643be66
commit
ea9f3bc6d1
@ -1970,7 +1970,7 @@ void nes_destroy_nic_qp(struct nes_vnic *nesvnic)
|
||||
dev_kfree_skb(
|
||||
nesvnic->nic.tx_skb[nesvnic->nic.sq_tail]);
|
||||
|
||||
nesvnic->nic.sq_tail = (++nesvnic->nic.sq_tail)
|
||||
nesvnic->nic.sq_tail = (nesvnic->nic.sq_tail + 1)
|
||||
& (nesvnic->nic.sq_size - 1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user