提交 ea9f3bc6 编写于 作者: R Roland Dreier

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: NRoland Dreier <rolandd@cisco.com>
上级 589643be
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册