All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu_opt_print: Remove shadowing opt decl
@ 2017-10-05 19:07 Dr. David Alan Gilbert (git)
  2017-10-05 19:12 ` Eric Blake
  2017-10-06  7:01 ` Markus Armbruster
  0 siblings, 2 replies; 5+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2017-10-05 19:07 UTC (permalink / raw)
  To: qemu-devel, armbru

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(-)

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) {
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu_opt_print: Remove shadowing opt decl
  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
  2017-10-06  7:01 ` Markus Armbruster
  1 sibling, 0 replies; 5+ messages in thread
From: Eric Blake @ 2017-10-05 19:12 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git), qemu-devel, armbru

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu_opt_print: Remove shadowing opt decl
  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
@ 2017-10-06  7:01 ` Markus Armbruster
  2017-10-06 16:13   ` Markus Armbruster
  1 sibling, 1 reply; 5+ messages in thread
From: Markus Armbruster @ 2017-10-06  7:01 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git); +Cc: qemu-devel

"Dr. David Alan Gilbert (git)" <dgilbert@redhat.com> writes:

> 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>

I can take this through my tree.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu_opt_print: Remove shadowing opt decl
  2017-10-06  7:01 ` Markus Armbruster
@ 2017-10-06 16:13   ` Markus Armbruster
  2017-10-06 16:20     ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Armbruster @ 2017-10-06 16:13 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git); +Cc: qemu-devel

Markus Armbruster <armbru@redhat.com> writes:

> "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com> writes:
>
>> 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>
>
> I can take this through my tree.

I'd like to change the headline to "option: Remove shadowing opt decl
from qemu_opt_print()", if that's alright with you.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu_opt_print: Remove shadowing opt decl
  2017-10-06 16:13   ` Markus Armbruster
@ 2017-10-06 16:20     ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2017-10-06 16:20 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel

* Markus Armbruster (armbru@redhat.com) wrote:
> Markus Armbruster <armbru@redhat.com> writes:
> 
> > "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com> writes:
> >
> >> 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>
> >
> > I can take this through my tree.
> 
> I'd like to change the headline to "option: Remove shadowing opt decl
> from qemu_opt_print()", if that's alright with you.

Sure.

Dave

--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-06 16:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2017-10-06  7:01 ` Markus Armbruster
2017-10-06 16:13   ` Markus Armbruster
2017-10-06 16:20     ` Dr. David Alan Gilbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.