cpu: Use virCPUData.arch in cpuDecode

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>
This commit is contained in:
Jiri Denemark 2017-02-02 22:04:25 +01:00
parent 4cd9545d89
commit 82ddd0b155

View 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) {