qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] vl: constify VGAInterfaceInfo


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 1/2] vl: constify VGAInterfaceInfo
Date: Fri, 12 Apr 2019 18:14:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 4/12/19 5:27 PM, Marc-André Lureau wrote:
> Signed-off-by: Marc-André Lureau <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>

> ---
>  vl.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/vl.c b/vl.c
> index c696ad2a13..0a96232e95 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2026,7 +2026,7 @@ typedef struct VGAInterfaceInfo {
>      const char *class_names[2];
>  } VGAInterfaceInfo;
>  
> -static VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] = {
> +static const VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] = {
>      [VGA_NONE] = {
>          .opt_name = "none",
>      },
> @@ -2072,7 +2072,7 @@ static VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] = {
>  
>  static bool vga_interface_available(VGAInterfaceType t)
>  {
> -    VGAInterfaceInfo *ti = &vga_interfaces[t];
> +    const VGAInterfaceInfo *ti = &vga_interfaces[t];
>  
>      assert(t < VGA_TYPE_MAX);
>      return !ti->class_names[0] ||
> @@ -2087,7 +2087,7 @@ static void select_vgahw(const char *p)
>  
>      assert(vga_interface_type == VGA_NONE);
>      for (t = 0; t < VGA_TYPE_MAX; t++) {
> -        VGAInterfaceInfo *ti = &vga_interfaces[t];
> +        const VGAInterfaceInfo *ti = &vga_interfaces[t];
>          if (ti->opt_name && strstart(p, ti->opt_name, &opts)) {
>              if (!vga_interface_available(t)) {
>                  error_report("%s not available", ti->name);
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]