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

Commit 98dafac5 authored by David Howells's avatar David Howells
Browse files

rxrpc: Use before_eq() and friends to compare serial numbers



before_eq() and friends should be used to compare serial numbers (when not
checking for (non)equality) rather than casting to int, subtracting and
checking the result.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 90bd684d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -578,7 +578,7 @@ static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb,
	}

	/* Discard any out-of-order or duplicate ACKs. */
	if ((int)sp->hdr.serial - (int)call->acks_latest <= 0) {
	if (before_eq(sp->hdr.serial, call->acks_latest)) {
		_debug("discard ACK %d <= %d",
		       sp->hdr.serial, call->acks_latest);
		return;