qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qemu_opt_print: Remove shadowing opt decl


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] qemu_opt_print: Remove shadowing opt decl
Date: Thu, 5 Oct 2017 14:12:45 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 10/05/2017 02:07 PM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
> 
> opt was declared as a separate local inside the last loop,
> shadowing the local at the top of the function.
> 
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
> ---
>  util/qemu-option.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <address@hidden>

> 
> diff --git a/util/qemu-option.c b/util/qemu-option.c
> index 9b1dc8093b..877c5b4d67 100644
> --- a/util/qemu-option.c
> +++ b/util/qemu-option.c
> @@ -766,7 +766,7 @@ void qemu_opts_print(QemuOpts *opts, const char 
> *separator)
>      }
>      for (; desc && desc->name; desc++) {
>          const char *value;
> -        QemuOpt *opt = qemu_opt_find(opts, desc->name);
> +        opt = qemu_opt_find(opts, desc->name);
>  
>          value = opt ? opt->str : desc->def_value_str;
>          if (!value) {
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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