From: Erik Skultety Date: Fri, 7 Dec 2018 14:07:37 +0000 (+0100) Subject: qemu: domain: gfx: Fix shadowing of a function argument in validation X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=414c51b7a11cc52c4276c7220d0b973c57c725d6;p=libvirt.git qemu: domain: gfx: Fix shadowing of a function argument in validation Since the code was never run, it would have been very hard to spot this mistake, especially since the compiler can't really warn about it. Signed-off-by: Erik Skultety Reviewed-by: John Ferlan --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 509da6bfea..1eb0e31df0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5783,9 +5783,7 @@ qemuDomainDeviceDefValidateGraphics(const virDomainGraphicsDef *graphics, size_t i; for (i = 0; i < def->ngraphics; i++) { - graphics = def->graphics[i]; - - if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS) { + if (def->graphics[i]->type == VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS) { have_egl_headless = true; break; }