render / rpms / libvirt

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