--- src/conf/cpu_conf.c | 4 ++-- src/cpu/cpu_x86.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 40fed96..1e657ad 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -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; } diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index acbdb1d..928a67b 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -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; } -- 1.8.3.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list