projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90bd684
)
rxrpc: Use before_eq() and friends to compare serial numbers
author
David Howells
<dhowells@redhat.com>
Fri, 23 Sep 2016 13:04:38 +0000
(14:04 +0100)
committer
David Howells
<dhowells@redhat.com>
Fri, 23 Sep 2016 13:05:08 +0000
(14:05 +0100)
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>
net/rxrpc/input.c
patch
|
blob
|
blame
|
history
diff --git
a/net/rxrpc/input.c
b/net/rxrpc/input.c
index cbb5d53f09d770f1db9f23fbec3f5bcde235d7e5..06027b6d9c19dbb0dc92c4ca8044092ce46b2964 100644
(file)
--- 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;