diff options
-rw-r--r-- | usr.bin/tmux/tty.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index d4ca3ae6180..777b697f116 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.81 2009/12/26 11:02:32 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.82 2010/01/01 14:29:18 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -146,7 +146,7 @@ void tty_start_tty(struct tty *tty) { struct termios tio; - int what, mode; + int mode; if (tty->fd == -1) return; @@ -170,10 +170,7 @@ tty_start_tty(struct tty *tty) tio.c_cc[VTIME] = 0; if (tcsetattr(tty->fd, TCSANOW, &tio) != 0) fatal("tcsetattr failed"); - - what = 0; - if (ioctl(tty->fd, TIOCFLUSH, &what) != 0) - fatal("ioctl(TIOCFLUSH)"); + tcflush(tty->fd, TCIOFLUSH); tty_putcode(tty, TTYC_SMCUP); |