summaryrefslogtreecommitdiffstats
path: root/sys/i386
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/i386
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/i386')
-rw-r--r--sys/i386/i386/trap.c5
-rw-r--r--sys/i386/i386/userconfig.c7
-rw-r--r--sys/i386/ibcs2/ibcs2_fcntl.c8
-rw-r--r--sys/i386/isa/asc.c6
-rw-r--r--sys/i386/isa/if_lnc.c6
-rw-r--r--sys/i386/isa/if_ze.c6
-rw-r--r--sys/i386/isa/mse.c6
-rw-r--r--sys/i386/isa/pcaudio.c6
-rw-r--r--sys/i386/isa/random_machdep.c6
-rw-r--r--sys/i386/isa/sound/audio.c6
-rw-r--r--sys/i386/isa/sound/gus_wave.c6
-rw-r--r--sys/i386/isa/sound/pas2_mixer.c4
-rw-r--r--sys/i386/isa/sound/sb_dsp.c12
-rw-r--r--sys/i386/isa/sound/sequencer.c8
-rw-r--r--sys/i386/isa/tw.c4
15 files changed, 52 insertions, 44 deletions
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c
index c0807b0..411d67f 100644
--- a/sys/i386/i386/trap.c
+++ b/sys/i386/i386/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/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c
index 62fc347..055c8e5 100644
--- a/sys/i386/i386/userconfig.c
+++ b/sys/i386/i386/userconfig.c
@@ -46,7 +46,7 @@
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
- ** $Id: userconfig.c,v 1.137 1999/04/24 20:20:37 peter Exp $
+ ** $Id: userconfig.c,v 1.138 1999/05/05 09:37:22 jkh Exp $
**/
/**
@@ -1378,13 +1378,14 @@ drawline(int row, int detail, DEV_LIST *list, int inverse, char *dhelp)
nb[58] = '\0';
pad(nb,60);
if (list->conflicts) /* device in conflict? */
+ {
if (inverse)
{
strcpy(nb+54," !nCONF!i "); /* tag conflict, careful of length */
}else{
strcpy(nb+54," !iCONF!n "); /* tag conflict, careful of length */
}
-
+ }
if (list->comment == DEV_DEVICE)
{
sprintf(db,"%s%d",list->dev,list->unit);
@@ -2522,7 +2523,7 @@ visuserconfig(void)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: userconfig.c,v 1.137 1999/04/24 20:20:37 peter Exp $
+ * $Id: userconfig.c,v 1.138 1999/05/05 09:37:22 jkh Exp $
*/
#include "scbus.h"
diff --git a/sys/i386/ibcs2/ibcs2_fcntl.c b/sys/i386/ibcs2/ibcs2_fcntl.c
index 0fc8b7f..436489263 100644
--- a/sys/i386/ibcs2/ibcs2_fcntl.c
+++ b/sys/i386/ibcs2/ibcs2_fcntl.c
@@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: ibcs2_fcntl.c,v 1.10 1997/11/06 19:28:24 phk Exp $
+ * $Id: ibcs2_fcntl.c,v 1.11 1998/02/04 04:12:28 eivind Exp $
*/
#include "opt_spx_hack.h"
@@ -183,10 +183,10 @@ ibcs2_open(p, uap)
ret = open(p, (struct open_args *)uap);
#ifdef SPX_HACK
- if(ret == ENXIO)
- if(!strcmp(SCARG(uap, path), "/compat/ibcs2/dev/spx"))
+ if (ret == ENXIO) {
+ if (!strcmp(SCARG(uap, path), "/compat/ibcs2/dev/spx"))
ret = spx_open(p, uap);
- else
+ } else
#endif /* SPX_HACK */
if (!ret && !noctty && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
struct filedesc *fdp = p->p_fd;
diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c
index 6a60374..2e14e04 100644
--- a/sys/i386/isa/asc.c
+++ b/sys/i386/isa/asc.c
@@ -34,7 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
- * $Id: asc.c,v 1.34 1999/01/28 01:59:53 dillon Exp $
+ * $Id: asc.c,v 1.35 1999/04/28 10:52:14 dt Exp $
*/
#include "asc.h"
@@ -864,7 +864,7 @@ ascpoll(dev_t dev, int events, struct proc *p)
sps=spltty();
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (scu->sbuf.count >0)
revents |= events & (POLLIN | POLLRDNORM);
else {
@@ -877,7 +877,7 @@ ascpoll(dev_t dev, int events, struct proc *p)
else
scu->selp.si_pid = p->p_pid;
}
-
+ }
splx(sps);
return 0;
}
diff --git a/sys/i386/isa/if_lnc.c b/sys/i386/isa/if_lnc.c
index b02c065..c102444 100644
--- a/sys/i386/isa/if_lnc.c
+++ b/sys/i386/isa/if_lnc.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_lnc.c,v 1.56 1999/04/18 01:37:19 paul Exp $
+ * $Id: if_lnc.c,v 1.57 1999/04/18 01:49:16 paul Exp $
*/
/*
@@ -1708,13 +1708,13 @@ lnc_start(struct ifnet *ifp)
*/
- if (no_entries_needed > (NDESC(sc->ntdre) - sc->pending_transmits))
+ if (no_entries_needed > (NDESC(sc->ntdre) - sc->pending_transmits)) {
if (!(head = chain_to_cluster(head))) {
log(LOG_ERR, "lnc%d: Couldn't get mbuf for transmit packet -- Resetting \n ",ifp->if_unit);
lnc_reset(sc);
return;
}
- else if ((sc->nic.ic == LANCE) || (sc->nic.ic == C_LANCE)) {
+ } else if ((sc->nic.ic == LANCE) || (sc->nic.ic == C_LANCE)) {
if ((head->m_len < 100) && (head->m_next)) {
len = 100 - head->m_len;
if (M_TRAILINGSPACE(head) < len) {
diff --git a/sys/i386/isa/if_ze.c b/sys/i386/isa/if_ze.c
index 3000e89..3edcf4c 100644
--- a/sys/i386/isa/if_ze.c
+++ b/sys/i386/isa/if_ze.c
@@ -47,7 +47,7 @@
*/
/*
- * $Id: if_ze.c,v 1.55 1998/10/22 05:58:39 bde Exp $
+ * $Id: if_ze.c,v 1.56 1998/12/07 21:58:21 archie Exp $
*/
/* XXX don't mix different PCCARD support code. */
@@ -982,7 +982,7 @@ outloop:
* See if there is room to send more data (i.e. one or both of the
* buffers is empty).
*/
- if (sc->data_buffered)
+ if (sc->data_buffered) {
if (sc->xmit_busy) {
/*
* No room. Indicate this to the outside world
@@ -999,7 +999,7 @@ outloop:
*/
ze_xmit(ifp);
}
-
+ }
IF_DEQUEUE(&sc->arpcom.ac_if.if_snd, m);
if (m == NULL) {
/*
diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c
index 836ec9c..001da0c 100644
--- a/sys/i386/isa/mse.c
+++ b/sys/i386/isa/mse.c
@@ -11,7 +11,7 @@
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
- * $Id: mse.c,v 1.39 1998/10/22 05:58:39 bde Exp $
+ * $Id: mse.c,v 1.40 1999/04/28 10:52:43 dt Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -528,7 +528,7 @@ msepoll(dev, events, p)
int revents = 0;
s = spltty();
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (sc->sc_bytesread != sc->mode.packetsize ||
sc->sc_deltax != 0 || sc->sc_deltay != 0 ||
(sc->sc_obuttons ^ sc->sc_buttons) != 0)
@@ -540,7 +540,7 @@ msepoll(dev, events, p)
*/
selrecord(p, &sc->sc_selp);
}
-
+ }
splx(s);
return (revents);
}
diff --git a/sys/i386/isa/pcaudio.c b/sys/i386/isa/pcaudio.c
index ad6ae1c..71febbf 100644
--- a/sys/i386/isa/pcaudio.c
+++ b/sys/i386/isa/pcaudio.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pcaudio.c,v 1.45 1998/12/27 20:09:31 sos Exp $
+ * $Id: pcaudio.c,v 1.46 1999/04/28 10:52:45 dt Exp $
*/
#include "pca.h"
@@ -531,7 +531,7 @@ pcapoll(dev_t dev, int events, struct proc *p)
s = spltty();
- if (events & (POLLOUT | POLLWRNORM))
+ if (events & (POLLOUT | POLLWRNORM)) {
if (!pca_status.in_use[0] || !pca_status.in_use[1] ||
!pca_status.in_use[2])
revents |= events & (POLLOUT | POLLWRNORM);
@@ -543,7 +543,7 @@ pcapoll(dev_t dev, int events, struct proc *p)
else
pca_status.wsel.si_pid = p->p_pid;
}
-
+ }
splx(s);
return (revents);
}
diff --git a/sys/i386/isa/random_machdep.c b/sys/i386/isa/random_machdep.c
index fbb0f86..4268375 100644
--- a/sys/i386/isa/random_machdep.c
+++ b/sys/i386/isa/random_machdep.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/i386/isa/sound/audio.c b/sys/i386/isa/sound/audio.c
index d92dd49..c526857 100644
--- a/sys/i386/isa/sound/audio.c
+++ b/sys/i386/isa/sound/audio.c
@@ -64,14 +64,14 @@ set_format(int dev, int fmt)
local_conversion[dev] = 0;
- if (!(audio_devs[dev]->format_mask & fmt)) /* Not supported */
+ if (!(audio_devs[dev]->format_mask & fmt)) { /* Not supported */
if (fmt == AFMT_MU_LAW) {
fmt = AFMT_U8;
local_conversion[dev] = AFMT_MU_LAW;
} else
fmt = AFMT_U8; /* This is always supported */
-
- audio_format[dev] = DMAbuf_ioctl(dev, SNDCTL_DSP_SETFMT,
+ }
+ audio_format[dev] = DMAbuf_ioctl(dev, SNDCTL_DSP_SETFMT,
(ioctl_arg) fmt, 1);
}
if (local_conversion[dev]) /* This shadows the HW format */
diff --git a/sys/i386/isa/sound/gus_wave.c b/sys/i386/isa/sound/gus_wave.c
index 54d36cb..70873b7 100644
--- a/sys/i386/isa/sound/gus_wave.c
+++ b/sys/i386/isa/sound/gus_wave.c
@@ -626,13 +626,15 @@ gus_set_voice_pos(int voice, long position)
{
int sample_no;
- if ((sample_no = sample_map[voice]) != -1)
- if (position < samples[sample_no].len)
+ if ((sample_no = sample_map[voice]) != -1) {
+ if (position < samples[sample_no].len) {
if (voices[voice].volume_irq_mode == VMODE_START_NOTE)
voices[voice].offset_pending = position;
else
gus_write_addr(0x0a, sample_ptrs[sample_no] + position,
samples[sample_no].mode & WAVE_16_BITS);
+ }
+ }
}
static void
diff --git a/sys/i386/isa/sound/pas2_mixer.c b/sys/i386/isa/sound/pas2_mixer.c
index 305ef45..1828ea2 100644
--- a/sys/i386/isa/sound/pas2_mixer.c
+++ b/sys/i386/isa/sound/pas2_mixer.c
@@ -132,12 +132,12 @@ pas_mixer_set(int whichDev, u_int level)
left = level & 0x7f;
right = (level & 0x7f00) >> 8;
- if (whichDev < SOUND_MIXER_NRDEVICES)
+ if (whichDev < SOUND_MIXER_NRDEVICES) {
if ((1 << whichDev) & rec_devices)
mixer = P_M_MV508_INPUTMIX;
else
mixer = P_M_MV508_OUTPUTMIX;
-
+ }
switch (whichDev) {
case SOUND_MIXER_VOLUME: /* Master volume (0-63) */
levels[whichDev] = mixer_output(right, left, 63, P_M_MV508_MASTER_A, 0);
diff --git a/sys/i386/isa/sound/sb_dsp.c b/sys/i386/isa/sound/sb_dsp.c
index 2facd33..8017bb9 100644
--- a/sys/i386/isa/sound/sb_dsp.c
+++ b/sys/i386/isa/sound/sb_dsp.c
@@ -247,13 +247,14 @@ dsp_speed(int speed)
/*
* SB models earlier than SB Pro have low limit for the input speed.
*/
- if (open_mode != OPEN_WRITE) /* Recording is possible */
- if (sbc_major < 3) /* Limited input speed with these cards */
+ if (open_mode != OPEN_WRITE) { /* Recording is possible */
+ if (sbc_major < 3) { /* Limited input speed with these cards */
if (sbc_major == 2 && sbc_minor > 0)
max_speed = 15000;
else
max_speed = 13000;
-
+ }
+ }
if (speed > max_speed)
speed = max_speed; /* Invalid speed */
@@ -1084,7 +1085,7 @@ sb_dsp_init(struct address_info * hw_config)
conf_printf(sb_dsp_operations.name, hw_config);
#if defined(CONFIG_SB16) && defined(CONFIG_SBPRO)
- if (!sb16) /* There is a better driver for SB16 */
+ if (!sb16) { /* There is a better driver for SB16 */
#endif /* CONFIG_SB16 && CONFIG_SBPRO */
if (num_audiodevs < MAX_AUDIO_DEV) {
audio_devs[my_dev = num_audiodevs++] = &sb_dsp_operations;
@@ -1104,6 +1105,9 @@ sb_dsp_init(struct address_info * hw_config)
#endif /* JAZZ16 */
} else
printf("SB: Too many DSP devices available\n");
+#if defined(CONFIG_SB16) && defined(CONFIG_SBPRO)
+ }
+#endif /* CONFIG_SB16 && CONFIG_SBPRO */
#else
conf_printf("SoundBlaster (configured without audio support)", hw_config);
#endif
diff --git a/sys/i386/isa/sound/sequencer.c b/sys/i386/isa/sound/sequencer.c
index 197bd74..ec3bb9b 100644
--- a/sys/i386/isa/sound/sequencer.c
+++ b/sys/i386/isa/sound/sequencer.c
@@ -1691,22 +1691,22 @@ sequencer_poll (int dev, struct fileinfo *file, int events, select_table * wait)
flags = splhigh();
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (!iqlen)
selrecord(wait, &selinfo[dev]);
else {
revents |= events & (POLLIN | POLLRDNORM);
midi_sleep_flag.mode &= ~WK_SLEEP;
}
-
- if (events & (POLLOUT | POLLWRNORM))
+ }
+ if (events & (POLLOUT | POLLWRNORM)) {
if (qlen >= SEQ_MAX_QUEUE)
selrecord(wait, &selinfo[dev]);
else {
revents |= events & (POLLOUT | POLLWRNORM);
seq_sleep_flag.mode &= ~WK_SLEEP;
}
-
+ }
splx(flags);
return (revents);
diff --git a/sys/i386/isa/tw.c b/sys/i386/isa/tw.c
index 0060e51..0fb02ed 100644
--- a/sys/i386/isa/tw.c
+++ b/sys/i386/isa/tw.c
@@ -544,12 +544,12 @@ int twpoll(dev, events, p)
sc = &tw_sc[TWUNIT(dev)];
s = spltty();
/* XXX is this correct? the original code didn't test select rw mode!! */
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if(sc->sc_nextin != sc->sc_nextout)
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(p, &sc->sc_selp);
-
+ }
splx(s);
return(revents);
}
OpenPOWER on IntegriCloud