mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
cpu: Clean up code style
This commit is contained in:
parent
13cdd389ed
commit
90f9fb5a7c
@ -357,8 +357,7 @@ virCPUDefParseXML(const xmlNodePtr node,
|
||||
}
|
||||
}
|
||||
|
||||
n = virXPathNodeSet("./feature", ctxt, &nodes);
|
||||
if (n < 0)
|
||||
if ((n = virXPathNodeSet("./feature", ctxt, &nodes)) < 0)
|
||||
goto error;
|
||||
|
||||
if (n > 0) {
|
||||
@ -372,6 +371,7 @@ virCPUDefParseXML(const xmlNodePtr node,
|
||||
if (VIR_RESIZE_N(def->features, def->nfeatures_max,
|
||||
def->nfeatures, n) < 0)
|
||||
goto error;
|
||||
|
||||
def->nfeatures = n;
|
||||
}
|
||||
|
||||
|
@ -1725,9 +1725,9 @@ x86UpdateCustom(virCPUDefPtr guest,
|
||||
|
||||
if (guest->match == VIR_CPU_MATCH_MINIMUM) {
|
||||
guest->match = VIR_CPU_MATCH_EXACT;
|
||||
if (x86ModelSubtractCPU(host_model, guest, map)
|
||||
|| x86DataToCPUFeatures(guest, VIR_CPU_FEATURE_REQUIRE,
|
||||
host_model->data, map))
|
||||
if (x86ModelSubtractCPU(host_model, guest, map) ||
|
||||
x86DataToCPUFeatures(guest, VIR_CPU_FEATURE_REQUIRE,
|
||||
host_model->data, map))
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user