qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH] softmmu/vl: Remove redundant local variable


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] softmmu/vl: Remove redundant local variable
Date: Mon, 28 Feb 2022 13:54:05 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1

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>



reply via email to

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