Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea9f3bc6 authored by Roland Dreier's avatar Roland Dreier
Browse files

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: default avatarRoland Dreier <rolandd@cisco.com>
parent 589643be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}