[PATCH 3/4] cpu: Clean up code style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]