qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>,
	qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH] qemu_opt_print: Remove shadowing opt decl
Date: Thu, 5 Oct 2017 14:12:45 -0500	[thread overview]
Message-ID: <68e4ca68-75de-6e02-01e0-5e52e8a79742@redhat.com> (raw)
In-Reply-To: <20171005190725.18712-1-dgilbert@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

On 10/05/2017 02:07 PM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> 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 <dgilbert@redhat.com>
> ---
>  util/qemu-option.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2017-10-05 19:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 19:07 [Qemu-devel] [PATCH] qemu_opt_print: Remove shadowing opt decl Dr. David Alan Gilbert (git)
2017-10-05 19:12 ` Eric Blake [this message]
2017-10-06  7:01 ` Markus Armbruster
2017-10-06 16:13   ` Markus Armbruster
2017-10-06 16:20     ` Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68e4ca68-75de-6e02-01e0-5e52e8a79742@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).