From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TY1hh-0004JX-9l for qemu-devel@nongnu.org; Mon, 12 Nov 2012 16:38:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TY1he-0004hm-8F for qemu-devel@nongnu.org; Mon, 12 Nov 2012 16:38:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TY1hd-0004g5-Vc for qemu-devel@nongnu.org; Mon, 12 Nov 2012 16:37:58 -0500 From: Eduardo Habkost Date: Mon, 12 Nov 2012 19:39:00 -0200 Message-Id: <1352756342-13716-16-git-send-email-ehabkost@redhat.com> In-Reply-To: <1352756342-13716-1-git-send-email-ehabkost@redhat.com> References: <1352756342-13716-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 15/17] target-i386: cpu_x86_init(): eliminate extra 'def1' variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= Cc: Don Slutz Just use '&def' where a pointer to the under-construction X86CPUDefinition struct is being used. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 57acf3a..9b8e480 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1526,19 +1526,19 @@ X86CPU *cpu_x86_init(const char *cpu_string) X86CPU *cpu; CPUX86State *env; Error *error = NULL; - X86CPUDefinition def1, *def = &def1; + X86CPUDefinition def; cpu = X86_CPU(object_new(TYPE_X86_CPU)); env = &cpu->env; env->cpu_model_str = cpu_string; - memset(def, 0, sizeof(*def)); + memset(&def, 0, sizeof(def)); - if (cpu_x86_find_by_name(def, cpu_string, &error) < 0) { + if (cpu_x86_find_by_name(&def, cpu_string, &error) < 0) { goto error; } - if (cpudef_2_x86_cpu(cpu, def, &error) < 0) { + if (cpudef_2_x86_cpu(cpu, &def, &error) < 0) { goto error; } -- 1.7.11.7