diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-11-25 05:44:38 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-11-25 05:44:38 +0000 |
commit | 61731e818fa2e2e4808c981e3ce73b5a1b0f003b (patch) | |
tree | 1b2b838c244481ee6cba7532e83a67d2574b15b7 | |
parent | 239fe4a2d73def9ecb8e89bc11bc5d04f9b2ab2c (diff) |
more min vs. ulmin/lmin fixes
-rw-r--r-- | sys/netinet/tcp_input.c | 8 | ||||
-rw-r--r-- | sys/netinet/tcp_output.c | 8 | ||||
-rw-r--r-- | sys/netinet/tcp_timer.c | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 72f19aafa92..1f2edfc9c3a 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.21 1998/11/17 19:23:01 provos Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.22 1998/11/25 05:44:36 millert Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -1292,9 +1292,9 @@ trimthenstep6: else if (++tp->t_dupacks == tcprexmtthresh) { #endif /* TCP_FACK */ tcp_seq onxt = tp->snd_nxt; - u_int win = - min(tp->snd_wnd, tp->snd_cwnd) / 2 / - tp->t_maxseg; + u_long win = + ulmin(tp->snd_wnd, tp->snd_cwnd) / + 2 / tp->t_maxseg; #if defined(TCP_SACK) || defined(TCP_NEWRENO) if (SEQ_LT(ti->ti_ack, tp->snd_last)){ diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 91898d5b140..6e88e2dbc9b 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.14 1998/11/25 05:20:51 millert Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.15 1998/11/25 05:44:37 millert Exp $ */ /* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */ /* @@ -202,7 +202,7 @@ again: tcp_sack_adjust(tp); #endif off = tp->snd_nxt - tp->snd_una; - win = min(tp->snd_wnd, tp->snd_cwnd); + win = ulmin(tp->snd_wnd, tp->snd_cwnd); flags = tcp_outflags[tp->t_state]; /* @@ -267,7 +267,7 @@ again: #ifdef TCP_SACK if (!sack_rxmit) { #endif - len = lmin(so->so_snd.sb_cc, win) - off; + len = ulmin(so->so_snd.sb_cc, win) - off; #if defined(TCP_SACK) && defined(TCP_FACK) /* @@ -350,7 +350,7 @@ again: * taking into account that we are limited by * TCP_MAXWIN << tp->rcv_scale. */ - long adv = min(win, (long)TCP_MAXWIN << tp->rcv_scale) - + long adv = lmin(win, (long)TCP_MAXWIN << tp->rcv_scale) - (tp->rcv_adv - tp->rcv_nxt); if (adv >= (long) (2 * tp->t_maxseg)) diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 53f4ef0e130..bd2d69c8fa6 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_timer.c,v 1.9 1998/11/17 19:23:02 provos Exp $ */ +/* $OpenBSD: tcp_timer.c,v 1.10 1998/11/25 05:44:37 millert Exp $ */ /* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */ /* @@ -279,7 +279,7 @@ tcp_timers(tp, timer) * to go below this.) */ { - u_int win = min(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg; + u_long win = ulmin(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg; if (win < 2) win = 2; tp->snd_cwnd = tp->t_maxseg; |