[Spice-devel] [PATCH] Amend patch 7/7
Pavel Grunt
pgrunt at redhat.com
Mon Apr 10 11:54:10 UTC 2017
Ack,
Thanks,
Pavel
On Fri, 2017-04-07 at 15:06 -0500, Jonathon Jongsma wrote:
> ---
> server/sound.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/server/sound.c b/server/sound.c
> index eb0220f..275248c 100644
> --- a/server/sound.c
> +++ b/server/sound.c
> @@ -317,13 +317,17 @@ static bool
> snd_record_handle_write(RecordChannelClient *record_client, size_t s
> static
> const char* spice_audio_data_mode_to_string(gint mode)
> {
> - static const char *str[] = {
> + static const char * const str[] = {
> [ SPICE_AUDIO_DATA_MODE_INVALID ] = "invalid",
> [ SPICE_AUDIO_DATA_MODE_RAW ] = "raw",
> [ SPICE_AUDIO_DATA_MODE_CELT_0_5_1 ] = "celt",
> [ SPICE_AUDIO_DATA_MODE_OPUS ] = "opus",
> };
> - return (mode >= 0 && mode < G_N_ELEMENTS(str)) ? str[mode] :
> "unknown audio codec";
> + if (mode >= 0 && mode < G_N_ELEMENTS(str)) {
> + return str[mode];
> + }
> +
> + return "unknown audio codec";
> }
>
> static bool
More information about the Spice-devel
mailing list