diff options
author | Zhang Han <zhanghan64@huawei.com> | 2021-01-15 09:24:25 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-01-15 11:49:26 +0100 |
commit | 6c6886bd01dcbdc47287ac5fbdaf89a8f49bc35f (patch) | |
tree | 95ba2d44607cc3f81c0c5f5d0ca688fcc3db9ff7 /audio/ossaudio.c | |
parent | 2d96a0058709067d417425743d5ed5fbff6c1b54 (diff) | |
download | qemu-6c6886bd01dcbdc47287ac5fbdaf89a8f49bc35f.zip |
audio: Add braces for statements/fix braces' position
Fix problems about braces:
-braces are necessary for all arms of if/for/while statements
-else should follow close brace '}'
Signed-off-by: Zhang Han <zhanghan64@huawei.com>
Message-id: 20210115012431.79533-1-zhanghan64@huawei.com
Message-Id: <20210115012431.79533-2-zhanghan64@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio/ossaudio.c')
-rw-r--r-- | audio/ossaudio.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/audio/ossaudio.c b/audio/ossaudio.c index c1db89f233..60eff66424 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -142,16 +142,14 @@ static int aud_to_ossfmt (AudioFormat fmt, int endianness) case AUDIO_FORMAT_S16: if (endianness) { return AFMT_S16_BE; - } - else { + } else { return AFMT_S16_LE; } case AUDIO_FORMAT_U16: if (endianness) { return AFMT_U16_BE; - } - else { + } else { return AFMT_U16_LE; } @@ -542,16 +540,14 @@ static int oss_init_out(HWVoiceOut *hw, struct audsettings *as, int trig = 0; if (ioctl (fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) { oss_logerr (errno, "SNDCTL_DSP_SETTRIGGER 0 failed\n"); - } - else { + } else { trig = PCM_ENABLE_OUTPUT; if (ioctl (fd, SNDCTL_DSP_SETTRIGGER, &trig) < 0) { oss_logerr ( errno, "SNDCTL_DSP_SETTRIGGER PCM_ENABLE_OUTPUT failed\n" ); - } - else { + } else { oss->mmapped = 1; } } |