3e5111
From 46761b7fdb0707036482c98eb3a80279753df484 Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <46761b7fdb0707036482c98eb3a80279753df484@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
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1428952
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
3e5111
index b78531e60..623b1699f 100644
5c27b6
--- a/src/conf/cpu_conf.c
5c27b6
+++ b/src/conf/cpu_conf.c
3e5111
@@ -230,7 +230,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;
3e5111
@@ -250,7 +250,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",
3e5111
@@ -263,7 +263,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