summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_timer.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2003-06-14 15:39:25 -0700
committerDavid S. Miller <davem@nuts.ninka.net>2003-06-14 15:39:25 -0700
commit53d30f644648b4b117fba6c06dfa0450118d0dd1 (patch)
treec79946aea3157ad4b14ef7bbdaba37a6fd2ee327 /net/ipv4/tcp_timer.c
parentd1c4a48c81a7f63cec10bdeef83e6a6d30ce3e9b (diff)
[TCP]: Use proper time_*() comparisons on jiffies.
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r--net/ipv4/tcp_timer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 0ed9f305232f..1fad1d9afcea 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -227,7 +227,7 @@ static void tcp_delack_timer(unsigned long data)
if (sk->sk_state == TCP_CLOSE || !(tp->ack.pending & TCP_ACK_TIMER))
goto out;
- if ((long)(tp->ack.timeout - jiffies) > 0) {
+ if (time_after(tp->ack.timeout, jiffies)) {
if (!mod_timer(&tp->delack_timer, tp->ack.timeout))
sock_hold(sk);
goto out;
@@ -436,7 +436,7 @@ static void tcp_write_timer(unsigned long data)
if (sk->sk_state == TCP_CLOSE || !tp->pending)
goto out;
- if ((long)(tp->timeout - jiffies) > 0) {
+ if (time_after(tp->timeout, jiffies)) {
if (!mod_timer(&tp->retransmit_timer, tp->timeout))
sock_hold(sk);
goto out;
@@ -516,7 +516,7 @@ static void tcp_synack_timer(struct sock *sk)
do {
reqp=&lopt->syn_table[i];
while ((req = *reqp) != NULL) {
- if ((long)(now - req->expires) >= 0) {
+ if (time_after_eq(now, req->expires)) {
if ((req->retrans < thresh ||
(req->acked && req->retrans < max_retries))
&& !req->class->rtx_syn_ack(sk, req, NULL)) {