summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-05-06 18:13:11 +0000
committerpeter <peter@FreeBSD.org>1999-05-06 18:13:11 +0000
commit73556bfee1b1d6dfc2a2f5d400228ca90bb34fc9 (patch)
treecd23f4c8f0d180abffffaece640b7971fd1103e2 /sys/kern/tty.c
parentff951279f971ed62682d7071d202a8e45e6e32a4 (diff)
downloadFreeBSD-src-73556bfee1b1d6dfc2a2f5d400228ca90bb34fc9.zip
FreeBSD-src-73556bfee1b1d6dfc2a2f5d400228ca90bb34fc9.tar.gz
Add sufficient braces to keep egcs happy about potentially ambiguous
if/else nesting.
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index e732834..4201196 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.c 8.8 (Berkeley) 1/21/94
- * $Id: tty.c,v 1.115 1999/02/19 19:34:49 luoqi Exp $
+ * $Id: tty.c,v 1.116 1999/04/27 11:16:17 phk Exp $
*/
/*-
@@ -1069,19 +1069,20 @@ ttypoll(tp, events, p)
| POLLHUP);
s = spltty();
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (ttnread(tp) > 0 || ISSET(tp->t_state, TS_ZOMBIE))
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(p, &tp->t_rsel);
-
- if (events & (POLLOUT | POLLWRNORM))
+ }
+ if (events & (POLLOUT | POLLWRNORM)) {
if ((tp->t_outq.c_cc <= tp->t_olowat &&
ISSET(tp->t_state, TS_CONNECTED))
|| ISSET(tp->t_state, TS_ZOMBIE))
revents |= events & (POLLOUT | POLLWRNORM);
else
selrecord(p, &tp->t_wsel);
+ }
splx(s);
return (revents);
}
OpenPOWER on IntegriCloud