aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Gang <gang.chen.5i5j@gmail.com>2014-04-16 07:57:41 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2014-04-28 08:55:31 +0400
commit6924bc1eef86170b7d5bee6c4aae8bb4a78350dd (patch)
tree38b1a5216b5c1b620538f7a1ab677bf7874c9b80
parenta629f2fdba18c8860e0995a846f7cb14b03cde24 (diff)
downloadqemu-6924bc1eef86170b7d5bee6c4aae8bb4a78350dd.zip
qemu-6924bc1eef86170b7d5bee6c4aae8bb4a78350dd.tar.gz
qemu-6924bc1eef86170b7d5bee6c4aae8bb4a78350dd.tar.bz2
vl: Eliminate a superfluous local variable
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> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r--vl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/vl.c b/vl.c
index 0b08a02..773649f 100644
--- a/vl.c
+++ b/vl.c
@@ -4404,15 +4404,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(&current_machine->init_args);
audio_init();