render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
Blob Blame History Raw
From ea0983a0cca71ba3fdefe94881fe75ee624adf5f Mon Sep 17 00:00:00 2001
Message-Id: <ea0983a0cca71ba3fdefe94881fe75ee624adf5f@dist-git>
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
Date: Wed, 4 Mar 2020 12:42:30 +0100
Subject: [PATCH] qemu: use def instead of vm->def in qemuExtDevicesStart
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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>
(cherry picked from commit e2ca6eb08731255b9b7cf3e938d20f4eae9fb427)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=1694166
Message-Id: <3876fc88964781aec976d1a92b810aa9cf53c656.1583322090.git.jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_extdevice.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c
index 463f76c21a..1869a42f11 100644
--- a/src/qemu/qemu_extdevice.c
+++ b/src/qemu/qemu_extdevice.c
@@ -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++) {
-- 
2.25.1