[Spice-devel] [PATCH] Amend patch 7/7

Christophe Fergeau cfergeau at redhat.com
Mon Apr 10 08:34:14 UTC 2017


Acked-by: Christophe Fergeau <cfergeau at redhat.com>
with that squashed in

Christophe

On Fri, Apr 07, 2017 at 03:06:55PM -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
> -- 
> 2.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170410/8e06946c/attachment.sig>


More information about the Spice-devel mailing list