1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00

qemu: use def instead of vm->def in qemuExtDevicesStart

We have a helper variable to make the code more concise,
use it consistently.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Ján Tomko 2020-01-24 19:41:45 +01:00
parent f84c7c67d5
commit e2ca6eb087

View File

@ -159,11 +159,11 @@ qemuExtDevicesStart(virQEMUDriverPtr driver,
int ret = 0;
size_t i;
if (qemuExtDevicesInitPaths(driver, vm->def) < 0)
if (qemuExtDevicesInitPaths(driver, def) < 0)
return -1;
for (i = 0; i < vm->def->nvideos; i++) {
virDomainVideoDefPtr video = vm->def->videos[i];
for (i = 0; i < def->nvideos; i++) {
virDomainVideoDefPtr video = def->videos[i];
if (video->backend == VIR_DOMAIN_VIDEO_BACKEND_TYPE_VHOSTUSER) {
ret = qemuExtVhostUserGPUStart(driver, vm, video);
@ -172,7 +172,7 @@ qemuExtDevicesStart(virQEMUDriverPtr driver,
}
}
if (vm->def->tpm)
if (def->tpm)
ret = qemuExtTPMStart(driver, vm, incomingMigration);
for (i = 0; i < def->nnets; i++) {