d76c62
From ea0983a0cca71ba3fdefe94881fe75ee624adf5f Mon Sep 17 00:00:00 2001
d76c62
Message-Id: <ea0983a0cca71ba3fdefe94881fe75ee624adf5f@dist-git>
d76c62
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
d76c62
Date: Wed, 4 Mar 2020 12:42:30 +0100
d76c62
Subject: [PATCH] qemu: use def instead of vm->def in qemuExtDevicesStart
d76c62
MIME-Version: 1.0
d76c62
Content-Type: text/plain; charset=UTF-8
d76c62
Content-Transfer-Encoding: 8bit
d76c62
d76c62
We have a helper variable to make the code more concise,
d76c62
use it consistently.
d76c62
d76c62
Signed-off-by: Ján Tomko <jtomko@redhat.com>
d76c62
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
d76c62
(cherry picked from commit e2ca6eb08731255b9b7cf3e938d20f4eae9fb427)
d76c62
Signed-off-by: Ján Tomko <jtomko@redhat.com>
d76c62
https://bugzilla.redhat.com/show_bug.cgi?id=1694166
d76c62
Message-Id: <3876fc88964781aec976d1a92b810aa9cf53c656.1583322090.git.jtomko@redhat.com>
d76c62
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
d76c62
---
d76c62
 src/qemu/qemu_extdevice.c | 8 ++++----
d76c62
 1 file changed, 4 insertions(+), 4 deletions(-)
d76c62
d76c62
diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c
d76c62
index 463f76c21a..1869a42f11 100644
d76c62
--- a/src/qemu/qemu_extdevice.c
d76c62
+++ b/src/qemu/qemu_extdevice.c
d76c62
@@ -159,11 +159,11 @@ qemuExtDevicesStart(virQEMUDriverPtr driver,
d76c62
     int ret = 0;
d76c62
     size_t i;
d76c62
 
d76c62
-    if (qemuExtDevicesInitPaths(driver, vm->def) < 0)
d76c62
+    if (qemuExtDevicesInitPaths(driver, def) < 0)
d76c62
         return -1;
d76c62
 
d76c62
-    for (i = 0; i < vm->def->nvideos; i++) {
d76c62
-        virDomainVideoDefPtr video = vm->def->videos[i];
d76c62
+    for (i = 0; i < def->nvideos; i++) {
d76c62
+        virDomainVideoDefPtr video = def->videos[i];
d76c62
 
d76c62
         if (video->backend == VIR_DOMAIN_VIDEO_BACKEND_TYPE_VHOSTUSER) {
d76c62
             ret = qemuExtVhostUserGPUStart(driver, vm, video);
d76c62
@@ -172,7 +172,7 @@ qemuExtDevicesStart(virQEMUDriverPtr driver,
d76c62
         }
d76c62
     }
d76c62
 
d76c62
-    if (vm->def->tpm)
d76c62
+    if (def->tpm)
d76c62
         ret = qemuExtTPMStart(driver, vm, incomingMigration);
d76c62
 
d76c62
     for (i = 0; i < def->nnets; i++) {
d76c62
-- 
d76c62
2.25.1
d76c62