[Spice-devel] [PATCH] reds: constify renderers_info array
Victor Toso
lists at victortoso.com
Mon Feb 1 16:22:14 CET 2016
Hi,
On Mon, Feb 01, 2016 at 01:53:02PM +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
> ---
> server/reds.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/server/reds.c b/server/reds.c
> index dbf0976..0ee55c9 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3449,7 +3449,7 @@ typedef struct RendererInfo {
> const char *name;
> } RendererInfo;
>
> -static RendererInfo renderers_info[] = {
> +static const RendererInfo renderers_info[] = {
> {RED_RENDERER_SW, "sw"},
> {RED_RENDERER_INVALID, NULL},
> };
> @@ -3457,9 +3457,9 @@ static RendererInfo renderers_info[] = {
> uint32_t renderers[RED_RENDERER_LAST];
> uint32_t num_renderers = 0;
>
> -static RendererInfo *find_renderer(const char *name)
> +static const RendererInfo *find_renderer(const char *name)
> {
> - RendererInfo *inf = renderers_info;
> + const RendererInfo *inf = renderers_info;
> while (inf->name) {
> if (strcmp(name, inf->name) == 0) {
> return inf;
> @@ -3471,7 +3471,7 @@ static RendererInfo *find_renderer(const char *name)
>
> static int red_add_renderer(const char *name)
> {
> - RendererInfo *inf;
> + const RendererInfo *inf;
>
> if (num_renderers == RED_RENDERER_LAST || !(inf = find_renderer(name))) {
> return FALSE;
> --
> 2.4.3
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list