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

@@ -86,8 +86,6 @@ int palette_put(VncPalette *palette, uint32_t color)
return 0;
}
if (!entry) {
VncPaletteEntry *entry;
entry = &palette->pool[palette->size];
entry->color = color;
entry->idx = idx;