* [PATCH] vl: remove shadowed local variables
@ 2023-09-25 14:47 Paolo Bonzini
2023-09-25 15:47 ` Daniel P. Berrangé
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2023-09-25 14:47 UTC (permalink / raw)
To: qemu-devel; +Cc: armbru
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
softmmu/vl.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 0d23054ccd2..cafb1a98427 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3210,7 +3210,6 @@ void qemu_init(int argc, char **argv)
}
break;
case QEMU_OPTION_watchdog_action: {
- QemuOpts *opts;
opts = qemu_opts_create(qemu_find_opts("action"), NULL, 0, &error_abort);
qemu_opt_set(opts, "watchdog", optarg, &error_abort);
break;
@@ -3521,16 +3520,16 @@ void qemu_init(int argc, char **argv)
break;
case QEMU_OPTION_compat:
{
- CompatPolicy *opts;
+ CompatPolicy *opts_policy;
Visitor *v;
v = qobject_input_visitor_new_str(optarg, NULL,
&error_fatal);
- visit_type_CompatPolicy(v, NULL, &opts, &error_fatal);
- QAPI_CLONE_MEMBERS(CompatPolicy, &compat_policy, opts);
+ visit_type_CompatPolicy(v, NULL, &opts_policy, &error_fatal);
+ QAPI_CLONE_MEMBERS(CompatPolicy, &compat_policy, opts_policy);
- qapi_free_CompatPolicy(opts);
+ qapi_free_CompatPolicy(opts_policy);
visit_free(v);
break;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-25 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25 14:47 [PATCH] vl: remove shadowed local variables Paolo Bonzini
2023-09-25 15:47 ` Daniel P. Berrangé
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).