ui: Clean up local variable shadowing

Local variables shadowing other local variables or parameters make the
code needlessly hard to understand.  Tracked down with -Wshadow=local.
Clean up: delete inner declarations when they are actually redundant,
else rename variables.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20230921121312.1301864-4-armbru@redhat.com>
This commit is contained in:
Markus Armbruster 2023-09-21 14:13:08 +02:00
parent 7f3de3f02f
commit e33e66b1b3
5 changed files with 22 additions and 24 deletions

View file

@ -1081,15 +1081,16 @@ static void qemu_spice_gl_update(DisplayChangeListener *dcl,
}
if (render_cursor) {
int x, y;
int ptr_x, ptr_y;
qemu_mutex_lock(&ssd->lock);
x = ssd->ptr_x;
y = ssd->ptr_y;
ptr_x = ssd->ptr_x;
ptr_y = ssd->ptr_y;
qemu_mutex_unlock(&ssd->lock);
egl_texture_blit(ssd->gls, &ssd->blit_fb, &ssd->guest_fb,
!y_0_top);
egl_texture_blend(ssd->gls, &ssd->blit_fb, &ssd->cursor_fb,
!y_0_top, x, y, 1.0, 1.0);
!y_0_top, ptr_x, ptr_y, 1.0, 1.0);
glFlush();
}