From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Markus Armbruster <armbru@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Michael Tokarev <mjt@tls.msk.ru>,
Anthony Liguori <aliguori@amazon.com>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-trivial] [PATCH trivial v2 2/2] vl: Eliminate a superfluous local variable
Date: Wed, 16 Apr 2014 07:57:41 +0800 [thread overview]
Message-ID: <534DC775.9000006@gmail.com> (raw)
In-Reply-To: <534DC6EA.6050203@gmail.com>
CODING_STYLE frowns upon mixing declarations and statements. main()
has such a declaration. Clean up by eliminating the variable.
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
vl.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/vl.c b/vl.c
index 377f962..d381443 100644
--- a/vl.c
+++ b/vl.c
@@ -4368,15 +4368,15 @@ int main(int argc, char **argv, char **envp)
qdev_machine_init();
- QEMUMachineInitArgs args = { .machine = machine,
- .ram_size = ram_size,
- .boot_order = boot_order,
- .kernel_filename = kernel_filename,
- .kernel_cmdline = kernel_cmdline,
- .initrd_filename = initrd_filename,
- .cpu_model = cpu_model };
-
- current_machine->init_args = args;
+ current_machine->init_args = (QEMUMachineInitArgs) {
+ .machine = machine,
+ .ram_size = ram_size,
+ .boot_order = boot_order,
+ .kernel_filename = kernel_filename,
+ .kernel_cmdline = kernel_cmdline,
+ .initrd_filename = initrd_filename,
+ .cpu_model = cpu_model };
+
machine->init(¤t_machine->init_args);
audio_init();
--
1.7.9.5
next prev parent reply other threads:[~2014-04-15 23:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 23:55 [Qemu-trivial] [PATCH trivial v2 0/2] vl: simplify code for main() Chen Gang
2014-04-15 23:56 ` [Qemu-trivial] [PATCH trivial v2 1/2] vl: Remove useless 'continue' Chen Gang
2014-04-15 23:57 ` Chen Gang [this message]
2014-04-16 7:04 ` [Qemu-trivial] [Qemu-devel] [PATCH trivial v2 0/2] vl: simplify code for main() Markus Armbruster
2014-04-24 13:57 ` [Qemu-trivial] " Michael Tokarev
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=534DC775.9000006@gmail.com \
--to=gang.chen.5i5j@gmail.com \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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 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.