OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0c3ef7
)
target/i386/cpu: avoid shadowed local variables
author
Paolo Bonzini
<pbonzini@redhat.com>
Mon, 25 Sep 2023 10:06:02 +0000
(12:06 +0200)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Tue, 26 Sep 2023 14:41:49 +0000
(16:41 +0200)
Reuse the pointer variable used for the unversioned model.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.c
patch
|
blob
|
history
diff --git
a/target/i386/cpu.c
b/target/i386/cpu.c
index
7836aa6
..
ed72883
100644
(file)
--- 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;