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/audio_template.h | |
parent | 2d96a0058709067d417425743d5ed5fbff6c1b54 (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/audio_template.h')
-rw-r--r-- | audio/audio_template.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/audio/audio_template.h b/audio/audio_template.h index 434df5d5e7..f77210e404 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -47,8 +47,7 @@ static void glue(audio_init_nb_voices_, TYPE)(AudioState *s, #ifdef DAC dolog ("Driver `%s' does not support " NAME "\n", drv->name); #endif - } - else { + } else { dolog ("Driver `%s' does not support %d " NAME " voices, max %d\n", drv->name, glue (s->nb_hw_voices_, TYPE), @@ -387,8 +386,7 @@ static SW *glue(audio_pcm_create_voice_pair_, TYPE)( if (pdo->fixed_settings) { hw_as = audiodev_to_audsettings(pdo); - } - else { + } else { hw_as = *as; } @@ -498,8 +496,7 @@ SW *glue (AUD_open_, TYPE) ( if (glue (audio_pcm_sw_init_, TYPE) (sw, hw, name, as)) { goto fail; } - } - else { + } else { sw = glue(audio_pcm_create_voice_pair_, TYPE)(s, name, as); if (!sw) { dolog ("Failed to create voice `%s'\n", name); @@ -553,8 +550,7 @@ uint64_t glue (AUD_get_elapsed_usec_, TYPE) (SW *sw, QEMUAudioTimeStamp *ts) if (cur_ts >= old_ts) { delta = cur_ts - old_ts; - } - else { + } else { delta = UINT64_MAX - old_ts + cur_ts; } |