* [PATCH] softmmu/vl: Remove redundant local variable
@ 2022-02-28 3:27 Zhenzhong Duan
2022-02-28 12:54 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 2+ messages in thread
From: Zhenzhong Duan @ 2022-02-28 3:27 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini
While there is already a local variable opts in main function scope,
no need to define another one with same name in smaller scope.
No functional changes.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
---
softmmu/vl.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 1fe028800fdf..34b24512f8c5 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3273,12 +3273,10 @@ void qemu_init(int argc, char **argv, char **envp)
exit(1);
}
break;
- case QEMU_OPTION_watchdog_action: {
- QemuOpts *opts;
+ case QEMU_OPTION_watchdog_action:
opts = qemu_opts_create(qemu_find_opts("action"), NULL, 0, &error_abort);
qemu_opt_set(opts, "watchdog", optarg, &error_abort);
break;
- }
case QEMU_OPTION_parallel:
add_device_config(DEV_PARALLEL, optarg);
default_parallel = 0;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] softmmu/vl: Remove redundant local variable
2022-02-28 3:27 [PATCH] softmmu/vl: Remove redundant local variable Zhenzhong Duan
@ 2022-02-28 12:54 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-02-28 12:54 UTC (permalink / raw)
To: Zhenzhong Duan, qemu-devel; +Cc: qemu-trivial, pbonzini
On 28/2/22 04:27, Zhenzhong Duan wrote:
> While there is already a local variable opts in main function scope,
> no need to define another one with same name in smaller scope.
>
> No functional changes.
>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
> ---
> softmmu/vl.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index 1fe028800fdf..34b24512f8c5 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -3273,12 +3273,10 @@ void qemu_init(int argc, char **argv, char **envp)
> exit(1);
> }
> break;
> - case QEMU_OPTION_watchdog_action: {
> - QemuOpts *opts;
> + case QEMU_OPTION_watchdog_action:
> opts = qemu_opts_create(qemu_find_opts("action"), NULL, 0, &error_abort);
> qemu_opt_set(opts, "watchdog", optarg, &error_abort);
> break;
> - }
> case QEMU_OPTION_parallel:
> add_device_config(DEV_PARALLEL, optarg);
> default_parallel = 0;
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-28 13:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-28 3:27 [PATCH] softmmu/vl: Remove redundant local variable Zhenzhong Duan
2022-02-28 12:54 ` Philippe Mathieu-Daudé
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).