diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 121c88ad43f7af3aca6e4515e6a2a1bbc488e7d8..41067617df67c6dfa5d6fd2ea43c67877bc3aead 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -405,18 +405,11 @@ x86DataAdd(virCPUx86Data *data1, const virCPUx86Data *data2) { virCPUx86DataIterator iter = virCPUx86DataIteratorInit(data2); - virCPUx86DataItemPtr item1; - virCPUx86DataItemPtr item2; - - while ((item2 = virCPUx86DataNext(&iter))) { - item1 = virCPUx86DataGet(data1, item2); + virCPUx86DataItemPtr item; - if (item1) { - x86cpuidSetBits(&item1->cpuid, &item2->cpuid); - } else { - if (virCPUx86DataAddItem(data1, item2) < 0) - return -1; - } + while ((item = virCPUx86DataNext(&iter))) { + if (virCPUx86DataAddItem(data1, item) < 0) + return -1; } return 0;