Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
target/i386/cpu: avoid shadowed local variables
Reuse the pointer variable used for the unversioned model.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Sep 26, 2023
1 parent e0c3ef7 commit 637123a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion target/i386/cpu.c
Expand Up @@ -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;
Expand Down

0 comments on commit 637123a

Please sign in to comment.