render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
99cbc7
From 15126024468aba26fbd4a21145c8ef9456535bee Mon Sep 17 00:00:00 2001
99cbc7
Message-Id: <15126024468aba26fbd4a21145c8ef9456535bee@dist-git>
99cbc7
From: Erik Skultety <eskultet@redhat.com>
99cbc7
Date: Tue, 9 Apr 2019 08:34:37 +0200
99cbc7
Subject: [PATCH] qemu: domain: gfx: Fix shadowing of a function argument in
99cbc7
 validation
99cbc7
99cbc7
Since the code was never run, it would have been very hard to spot this
99cbc7
mistake, especially since the compiler can't really warn about it.
99cbc7
99cbc7
Signed-off-by: Erik Skultety <eskultet@redhat.com>
99cbc7
Reviewed-by: John Ferlan <jferlan@redhat.com>
99cbc7
(cherry picked from commit 414c51b7a11cc52c4276c7220d0b973c57c725d6)
99cbc7
99cbc7
https: //bugzilla.redhat.com/show_bug.cgi?id=1628892
99cbc7
Signed-off-by: Erik Skultety <eskultet@redhat.com>
99cbc7
Message-Id: <0298fbe0dd26d9463c69aaf2b6ecf295d0fc22e2.1554791287.git.eskultet@redhat.com>
99cbc7
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
99cbc7
---
99cbc7
 src/qemu/qemu_domain.c | 4 +---
99cbc7
 1 file changed, 1 insertion(+), 3 deletions(-)
99cbc7
99cbc7
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
99cbc7
index 76f48d6f83..81699110fc 100644
99cbc7
--- a/src/qemu/qemu_domain.c
99cbc7
+++ b/src/qemu/qemu_domain.c
99cbc7
@@ -5570,9 +5570,7 @@ qemuDomainDeviceDefValidateGraphics(const virDomainGraphicsDef *graphics,
99cbc7
     size_t i;
99cbc7
 
99cbc7
     for (i = 0; i < def->ngraphics; i++) {
99cbc7
-        graphics = def->graphics[i];
99cbc7
-
99cbc7
-        if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS) {
99cbc7
+        if (def->graphics[i]->type == VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS) {
99cbc7
             have_egl_headless = true;
99cbc7
             break;
99cbc7
         }
99cbc7
-- 
99cbc7
2.21.0
99cbc7