vendor->cpuid.edx = virReadBufInt32LE(string + 4);
vendor->cpuid.ecx = virReadBufInt32LE(string + 8);
- if (!map->vendors) {
- map->vendors = vendor;
- } else {
- vendor->next = map->vendors;
- map->vendors = vendor;
- }
+ vendor->next = map->vendors;
+ map->vendors = vendor;
cleanup:
VIR_FREE(string);
map->migrate_blockers = migrate_blocker;
}
- if (!map->features) {
- map->features = feature;
- } else {
- feature->next = map->features;
- map->features = feature;
- }
+ feature->next = map->features;
+ map->features = feature;
cleanup:
ctxt->node = ctxt_node;
goto error;
}
- if (!map->models) {
- map->models = model;
- } else {
- model->next = map->models;
- map->models = model;
- }
+ model->next = map->models;
+ map->models = model;
cleanup:
VIR_FREE(vendor);
if (virCPUx86DataAddCPUID(feature->data, &x86_kvm_features[i].cpuid))
goto error;
- if (!map->features) {
- map->features = feature;
- } else {
- feature->next = map->features;
- map->features = feature;
- }
-
+ feature->next = map->features;
+ map->features = feature;
feature = NULL;
}