From b6897e201585660714fce8ea46a66b1f46b2c88a Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Thu, 11 Feb 2016 09:19:08 +0800 Subject: [PATCH] fix a compilation warning --- qemu/vl.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/qemu/vl.c b/qemu/vl.c index 7cbfb065..f1599c6d 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -107,17 +107,15 @@ int machine_initialize(struct uc_struct *uc) module_call_init(uc, MODULE_INIT_MACHINE); // this will auto initialize all register objects above. machine_class = find_default_machine(uc, uc->arch); - if (!uc->machine_state) { - if (machine_class == NULL) { - //fprintf(stderr, "No machine specified, and there is no default.\n" - // "Use -machine help to list supported machines!\n"); - return -2; - } - - current_machine = MACHINE(uc, object_new(uc, object_class_get_name( - OBJECT_CLASS(machine_class)))); - uc->machine_state = current_machine; + if (machine_class == NULL) { + //fprintf(stderr, "No machine specified, and there is no default.\n" + // "Use -machine help to list supported machines!\n"); + return -2; } + + current_machine = MACHINE(uc, object_new(uc, object_class_get_name( + OBJECT_CLASS(machine_class)))); + uc->machine_state = current_machine; current_machine->uc = uc; uc->cpu_exec_init_all(uc);