summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/tty.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index de83fdea476..1c7ba6bffac 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.115 2014/11/18 01:59:58 tedu Exp $ */
+/* $OpenBSD: tty.c,v 1.116 2014/12/01 07:51:47 deraadt Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -2091,15 +2091,14 @@ ttspeedtab(int speed, const struct speedtab *table)
void
ttsetwater(struct tty *tp)
{
- int cps, x, omost;
+ int cps, x;
#define CLAMP(x, h, l) ((x) > h ? h : ((x) < l) ? l : (x))
cps = tp->t_ospeed / 10;
tp->t_lowat = x = CLAMP(cps / 2, TTMAXLOWAT, TTMINLOWAT);
x += cps;
- omost = MIN(tp->t_outq.c_cn - 200, tp->t_outq.c_cn);
- tp->t_hiwat = CLAMP(x, omost, 100);
+ tp->t_hiwat = CLAMP(x, tp->t_outq.c_cn, 100);
#undef CLAMP
}