summaryrefslogtreecommitdiffstats
path: root/sys/kern
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
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')
-rw-r--r--sys/kern/kern_malloc.c5
-rw-r--r--sys/kern/kern_proc.c8
-rw-r--r--sys/kern/kern_random.c6
-rw-r--r--sys/kern/kern_shutdown.c7
-rw-r--r--sys/kern/subr_log.c6
-rw-r--r--sys/kern/subr_trap.c5
-rw-r--r--sys/kern/tty.c9
-rw-r--r--sys/kern/tty_snoop.c4
8 files changed, 28 insertions, 22 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index d3939b8..e7499d5 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94
- * $Id: kern_malloc.c,v 1.53 1999/01/21 21:54:32 msmith Exp $
+ * $Id: kern_malloc.c,v 1.54 1999/01/27 21:49:56 dillon Exp $
*/
#include "opt_vm.h"
@@ -348,11 +348,12 @@ free(addr, type)
freep->type = type;
#endif /* INVARIANTS */
kup->ku_freecnt++;
- if (kup->ku_freecnt >= kbp->kb_elmpercl)
+ if (kup->ku_freecnt >= kbp->kb_elmpercl) {
if (kup->ku_freecnt > kbp->kb_elmpercl)
panic("free: multiple frees");
else if (kbp->kb_totalfree > kbp->kb_highwat)
kbp->kb_couldfree++;
+ }
kbp->kb_totalfree++;
ksp->ks_memuse -= size;
if (ksp->ks_memuse + size >= ksp->ks_limit &&
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 6e6e4b1..679c7b3 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_proc.c 8.7 (Berkeley) 2/14/95
- * $Id: kern_proc.c,v 1.47 1999/04/28 11:36:57 phk Exp $
+ * $Id: kern_proc.c,v 1.48 1999/05/03 23:57:21 billf Exp $
*/
#include <sys/param.h>
@@ -321,11 +321,12 @@ fixjobc(p, pgrp, entering)
* group; if so, adjust count for p's process group.
*/
if ((hispgrp = p->p_pptr->p_pgrp) != pgrp &&
- hispgrp->pg_session == mysession)
+ hispgrp->pg_session == mysession) {
if (entering)
pgrp->pg_jobc++;
else if (--pgrp->pg_jobc == 0)
orphanpg(pgrp);
+ }
/*
* Check this process' children to see whether they qualify
@@ -335,11 +336,12 @@ fixjobc(p, pgrp, entering)
for (p = p->p_children.lh_first; p != 0; p = p->p_sibling.le_next)
if ((hispgrp = p->p_pgrp) != pgrp &&
hispgrp->pg_session == mysession &&
- p->p_stat != SZOMB)
+ p->p_stat != SZOMB) {
if (entering)
hispgrp->pg_jobc++;
else if (--hispgrp->pg_jobc == 0)
orphanpg(hispgrp);
+ }
}
/*
diff --git a/sys/kern/kern_random.c b/sys/kern/kern_random.c
index fbb0f86..4268375 100644
--- a/sys/kern/kern_random.c
+++ b/sys/kern/kern_random.c
@@ -1,7 +1,7 @@
/*
* random_machdep.c -- A strong random number generator
*
- * $Id: random_machdep.c,v 1.29 1998/06/21 11:33:32 bde Exp $
+ * $Id: random_machdep.c,v 1.30 1999/04/21 07:26:28 peter Exp $
*
* Version 0.95, last modified 18-Oct-95
*
@@ -365,12 +365,12 @@ random_poll(dev_t dev, int events, struct proc *p)
int revents = 0;
s = splhigh();
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (random_state.entropy_count >= 8)
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(p, &random_state.rsel);
-
+ }
splx(s);
if (events & (POLLOUT | POLLWRNORM))
revents |= events & (POLLOUT | POLLWRNORM); /* heh */
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index f47801b..7a8d8ee 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
- * $Id: kern_shutdown.c,v 1.47 1999/04/27 11:16:04 phk Exp $
+ * $Id: kern_shutdown.c,v 1.48 1999/05/03 23:57:22 billf Exp $
*/
#include "opt_ddb.h"
@@ -233,12 +233,13 @@ boot(howto)
*/
nbusy = 0;
for (bp = &buf[nbuf]; --bp >= buf; ) {
- if (((bp->b_flags & (B_BUSY | B_INVAL)) == B_BUSY)
- ||((bp->b_flags & (B_DELWRI | B_INVAL))== B_DELWRI))
+ if (((bp->b_flags & (B_BUSY | B_INVAL)) == B_BUSY) ||
+ ((bp->b_flags & (B_DELWRI | B_INVAL))== B_DELWRI)) {
if(bp->b_dev == NODEV)
CIRCLEQ_REMOVE(&mountlist, bp->b_vp->v_mount, mnt_list);
else
nbusy++;
+ }
}
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c
index 1204376..c33d6bb 100644
--- a/sys/kern/subr_log.c
+++ b/sys/kern/subr_log.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)subr_log.c 8.1 (Berkeley) 6/10/93
- * $Id: subr_log.c,v 1.32 1998/11/11 10:55:56 truckman Exp $
+ * $Id: subr_log.c,v 1.33 1998/12/07 21:58:29 archie Exp $
*/
/*
@@ -167,12 +167,12 @@ logpoll(dev, events, p)
s = splhigh();
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (msgbufp->msg_bufr != msgbufp->msg_bufx)
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(p, &logsoftc.sc_selp);
-
+ }
splx(s);
return (revents);
}
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index c0807b0..411d67f 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.135 1999/04/19 14:14:13 peter Exp $
+ * $Id: trap.c,v 1.136 1999/04/28 01:03:26 luoqi Exp $
*/
/*
@@ -1091,11 +1091,12 @@ syscall(frame)
default:
bad:
- if (p->p_sysent->sv_errsize)
+ if (p->p_sysent->sv_errsize) {
if (error >= p->p_sysent->sv_errsize)
error = -1; /* XXX */
else
error = p->p_sysent->sv_errtbl[error];
+ }
frame.tf_eax = error;
frame.tf_eflags |= PSL_C;
break;
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);
}
diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c
index 0a1438d..ebffb2a 100644
--- a/sys/kern/tty_snoop.c
+++ b/sys/kern/tty_snoop.c
@@ -497,12 +497,12 @@ snppoll(dev, events, p)
* Caller should see if we down via FIONREAD ioctl().The last should
* return -1 to indicate down state.
*/
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (snp->snp_flags & SNOOP_DOWN || snp->snp_len > 0)
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(p, &snp->snp_sel);
-
+ }
return (revents);
}
OpenPOWER on IntegriCloud