aboutsummaryrefslogtreecommitdiff
path: root/audio/alsaaudio.c
diff options
context:
space:
mode:
authorZhang Han <zhanghan64@huawei.com>2021-01-15 09:24:25 +0800
committerGerd Hoffmann <kraxel@redhat.com>2021-01-15 11:49:26 +0100
commit6c6886bd01dcbdc47287ac5fbdaf89a8f49bc35f (patch)
tree95ba2d44607cc3f81c0c5f5d0ca688fcc3db9ff7 /audio/alsaaudio.c
parent2d96a0058709067d417425743d5ed5fbff6c1b54 (diff)
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/alsaaudio.c')
-rw-r--r--audio/alsaaudio.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index 5a871aaf6b..fcc2f62864 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -278,32 +278,28 @@ static snd_pcm_format_t aud_to_alsafmt (AudioFormat fmt, int endianness)
case AUDIO_FORMAT_S16:
if (endianness) {
return SND_PCM_FORMAT_S16_BE;
- }
- else {
+ } else {
return SND_PCM_FORMAT_S16_LE;
}
case AUDIO_FORMAT_U16:
if (endianness) {
return SND_PCM_FORMAT_U16_BE;
- }
- else {
+ } else {
return SND_PCM_FORMAT_U16_LE;
}
case AUDIO_FORMAT_S32:
if (endianness) {
return SND_PCM_FORMAT_S32_BE;
- }
- else {
+ } else {
return SND_PCM_FORMAT_S32_LE;
}
case AUDIO_FORMAT_U32:
if (endianness) {
return SND_PCM_FORMAT_U32_BE;
- }
- else {
+ } else {
return SND_PCM_FORMAT_U32_LE;
}
@@ -722,8 +718,7 @@ static int alsa_voice_ctl (snd_pcm_t *handle, const char *typ, int ctl)
alsa_logerr (err, "Could not stop %s\n", typ);
return -1;
}
- }
- else {
+ } else {
err = snd_pcm_prepare (handle);
if (err < 0) {
alsa_logerr (err, "Could not prepare handle for %s\n", typ);