summaryrefslogtreecommitdiffstats
path: root/net/rxrpc
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-23 14:04:38 +0100
committerDavid Howells <dhowells@redhat.com>2016-09-23 14:05:08 +0100
commit98dafac5697fbe1fb4bef9e3204baf9051641b00 (patch)
treed03c8d938f336f1f14f3f3fdeb3c514def6cd374 /net/rxrpc
parent90bd684ded900673d86f64f4b4197704a38f04bc (diff)
downloadlinux-98dafac5697fbe1fb4bef9e3204baf9051641b00.tar.gz
linux-98dafac5697fbe1fb4bef9e3204baf9051641b00.tar.bz2
linux-98dafac5697fbe1fb4bef9e3204baf9051641b00.zip
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: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc')
-rw-r--r--net/rxrpc/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index cbb5d53f09d7..06027b6d9c19 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -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;