5c27b6
From 199cd8f7c434fb1248ba3338bd9e402ffe7bc57b Mon Sep 17 00:00:00 2001
5c27b6
Message-Id: <199cd8f7c434fb1248ba3338bd9e402ffe7bc57b@dist-git>
5c27b6
From: Jiri Denemark <jdenemar@redhat.com>
5c27b6
Date: Mon, 24 Apr 2017 15:38:41 +0200
5c27b6
Subject: [PATCH] conf: Rename mode parameter in virCPUDefParseXML
5c27b6
5c27b6
The type of this parameter is virCPUType so calling it 'mode' is pretty
5c27b6
strange, 'type' is a much better name.
5c27b6
5c27b6
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
5c27b6
(cherry picked from commit e841a41169dd726af13f29cb57fbafe658b7011a)
5c27b6
5c27b6
https://bugzilla.redhat.com/show_bug.cgi?id=1447612
5c27b6
5c27b6
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
5c27b6
---
5c27b6
 src/conf/cpu_conf.c | 6 +++---
5c27b6
 1 file changed, 3 insertions(+), 3 deletions(-)
5c27b6
5c27b6
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
5c27b6
index b71528ef5..9ffaf1e95 100644
5c27b6
--- a/src/conf/cpu_conf.c
5c27b6
+++ b/src/conf/cpu_conf.c
5c27b6
@@ -144,7 +144,7 @@ virCPUDefCopy(const virCPUDef *cpu)
5c27b6
 virCPUDefPtr
5c27b6
 virCPUDefParseXML(xmlNodePtr node,
5c27b6
                   xmlXPathContextPtr ctxt,
5c27b6
-                  virCPUType mode)
5c27b6
+                  virCPUType type)
5c27b6
 {
5c27b6
     virCPUDefPtr def;
5c27b6
     xmlNodePtr *nodes = NULL;
5c27b6
@@ -164,7 +164,7 @@ virCPUDefParseXML(xmlNodePtr node,
5c27b6
     if (VIR_ALLOC(def) < 0)
5c27b6
         return NULL;
5c27b6
 
5c27b6
-    if (mode == VIR_CPU_TYPE_AUTO) {
5c27b6
+    if (type == VIR_CPU_TYPE_AUTO) {
5c27b6
         if (virXPathBoolean("boolean(./arch)", ctxt)) {
5c27b6
             if (virXPathBoolean("boolean(./@match)", ctxt)) {
5c27b6
                 virReportError(VIR_ERR_XML_ERROR, "%s",
5c27b6
@@ -177,7 +177,7 @@ virCPUDefParseXML(xmlNodePtr node,
5c27b6
             def->type = VIR_CPU_TYPE_GUEST;
5c27b6
         }
5c27b6
     } else {
5c27b6
-        def->type = mode;
5c27b6
+        def->type = type;
5c27b6
     }
5c27b6
 
5c27b6
     if ((cpuMode = virXMLPropString(node, "mode"))) {
5c27b6
-- 
5c27b6
2.12.2
5c27b6