diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-09-25 12:06:02 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-09-26 16:41:49 +0200 |
commit | 637123a21381b2c5833d9d663af06e3105d8caa9 (patch) | |
tree | d4fcc2ef831ab0d39ad8d7ab18c5df86f99dc836 /target | |
parent | e0c3ef715baabbea6d59335bebfc7e40f1724d7e (diff) |
target/i386/cpu: avoid shadowed local variables
Reuse the pointer variable used for the unversioned model.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/cpu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 7836aa6692..ed72883bf3 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5976,9 +5976,10 @@ static void x86_register_cpudef_types(const X86CPUDefinition *def) /* Versioned models: */ for (vdef = x86_cpu_def_get_versions(def); vdef->version; vdef++) { - X86CPUModel *m = g_new0(X86CPUModel, 1); g_autofree char *name = x86_cpu_versioned_model_name(def, vdef->version); + + m = g_new0(X86CPUModel, 1); m->cpudef = def; m->version = vdef->version; m->note = vdef->note; |