From 34b22968a49a46a62b9a7f262a25449b72cfa7ab Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 3 Sep 2018 17:28:53 -0400 Subject: [PATCH] target/i386/cpu: Use type_register instead of type_register_static in x86_cpu_register_types() The lifetime of the TypeInfo instance doesn't live indefinitely, so we should be using the regular type_register(). --- qemu/target/i386/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qemu/target/i386/cpu.c b/qemu/target/i386/cpu.c index 63a90d7a..aac2b727 100644 --- a/qemu/target/i386/cpu.c +++ b/qemu/target/i386/cpu.c @@ -5243,12 +5243,10 @@ void x86_cpu_register_types(void *opaque) true, }; - //printf("... register X86 cpu\n"); int i; - type_register_static(opaque, &x86_cpu_type_info); + type_register(opaque, &x86_cpu_type_info); for (i = 0; i < ARRAY_SIZE(builtin_x86_defs); i++) { x86_register_cpudef_type(opaque, &builtin_x86_defs[i]); } - //printf("... END OF register X86 cpu\n"); }