diff options
author | peter <peter@FreeBSD.org> | 1999-05-06 18:13:11 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-05-06 18:13:11 +0000 |
commit | 73556bfee1b1d6dfc2a2f5d400228ca90bb34fc9 (patch) | |
tree | cd23f4c8f0d180abffffaece640b7971fd1103e2 /sys/i386/isa/sound | |
parent | ff951279f971ed62682d7071d202a8e45e6e32a4 (diff) | |
download | FreeBSD-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/isa/sound')
-rw-r--r-- | sys/i386/isa/sound/audio.c | 6 | ||||
-rw-r--r-- | sys/i386/isa/sound/gus_wave.c | 6 | ||||
-rw-r--r-- | sys/i386/isa/sound/pas2_mixer.c | 4 | ||||
-rw-r--r-- | sys/i386/isa/sound/sb_dsp.c | 12 | ||||
-rw-r--r-- | sys/i386/isa/sound/sequencer.c | 8 |
5 files changed, 21 insertions, 15 deletions
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); |