]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: Rename mode parameter in virCPUDefParseXML
authorJiri Denemark <jdenemar@redhat.com>
Mon, 24 Apr 2017 13:38:41 +0000 (15:38 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 27 Apr 2017 19:50:29 +0000 (21:50 +0200)
The type of this parameter is virCPUType so calling it 'mode' is pretty
strange, 'type' is a much better name.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/conf/cpu_conf.c

index b78531e60261d99b45ccfd2f5368c24581906d7b..623b1699fd6e699e7c33541d60cb6cea3ffb573d 100644 (file)
@@ -230,7 +230,7 @@ virCPUDefCopy(const virCPUDef *cpu)
 virCPUDefPtr
 virCPUDefParseXML(xmlNodePtr node,
                   xmlXPathContextPtr ctxt,
-                  virCPUType mode)
+                  virCPUType type)
 {
     virCPUDefPtr def;
     xmlNodePtr *nodes = NULL;
@@ -250,7 +250,7 @@ virCPUDefParseXML(xmlNodePtr node,
     if (VIR_ALLOC(def) < 0)
         return NULL;
 
-    if (mode == VIR_CPU_TYPE_AUTO) {
+    if (type == VIR_CPU_TYPE_AUTO) {
         if (virXPathBoolean("boolean(./arch)", ctxt)) {
             if (virXPathBoolean("boolean(./@match)", ctxt)) {
                 virReportError(VIR_ERR_XML_ERROR, "%s",
@@ -263,7 +263,7 @@ virCPUDefParseXML(xmlNodePtr node,
             def->type = VIR_CPU_TYPE_GUEST;
         }
     } else {
-        def->type = mode;
+        def->type = type;
     }
 
     if ((cpuMode = virXMLPropString(node, "mode"))) {