]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
cpu: Use virCPUData.arch in cpuDecode
authorJiri Denemark <jdenemar@redhat.com>
Thu, 2 Feb 2017 21:04:25 +0000 (22:04 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 22 Feb 2017 11:09:00 +0000 (12:09 +0100)
virCPUDef.arch is not required to be filled in for guest CPU
definitions. It doesn't make sense to artificially mandate it to be set
when cpuDecode is called especially when virCPUData.arch passed to
cpuDecode already contains the architecture.

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

index 3063f00eb6d7a55297208e2b66b5a0771c76157b..6a808a0c17c780bc30199bd0ad342ed6ec2f259c 100644 (file)
@@ -240,7 +240,7 @@ cpuDecode(virCPUDefPtr cpu,
         return -1;
     }
 
-    if ((driver = cpuGetSubDriver(cpu->arch)) == NULL)
+    if ((driver = cpuGetSubDriver(data->arch)) == NULL)
         return -1;
 
     if (driver->decode == NULL) {