qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philippe.mathieu.daude@gmail.com>
To: Zhenzhong Duan <zhenzhong.duan@intel.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, pbonzini@redhat.com
Subject: Re: [PATCH] softmmu/vl: Remove redundant local variable
Date: Mon, 28 Feb 2022 13:54:05 +0100	[thread overview]
Message-ID: <539f0447-c161-5752-e35f-cbee7e45a98a@gmail.com> (raw)
In-Reply-To: <20220228032710.184181-1-zhenzhong.duan@intel.com>

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	other threads:[~2022-02-28 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28  3:27 [PATCH] softmmu/vl: Remove redundant local variable Zhenzhong Duan
2022-02-28 12:54 ` Philippe Mathieu-Daudé [this message]

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=539f0447-c161-5752-e35f-cbee7e45a98a@gmail.com \
    --to=philippe.mathieu.daude@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=zhenzhong.duan@intel.com \
    /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).