if (!data || !(map = virCPUx86GetMap()))
return -1;
- candidate = map->models;
- while (candidate != NULL) {
+ for (candidate = map->models; candidate; candidate = candidate->next) {
if (!cpuModelIsAllowed(candidate->name, models, nmodels)) {
if (preferred && STREQ(candidate->name, preferred)) {
if (cpu->fallback != VIR_CPU_FALLBACK_ALLOW) {
VIR_DEBUG("CPU model %s not allowed by hypervisor; ignoring",
candidate->name);
}
- goto next;
+ continue;
}
if (!(cpuCandidate = x86DataToCPU(data, candidate, map)))
candidate->vendor->name, candidate->name,
cpuCandidate->vendor);
virCPUDefFree(cpuCandidate);
- goto next;
+ continue;
}
if ((rc = x86DecodeUseCandidate(cpuModel, cpuCandidate, preferred,
} else {
virCPUDefFree(cpuCandidate);
}
-
- next:
- candidate = candidate->next;
}
if (cpuModel == NULL) {