Skip to content

Commit

Permalink
hw/ppc/e500: Resolve variable shadowing
Browse files Browse the repository at this point in the history
Assign to the outer variable instead which even saves some code.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20221216145709.271940-6-shentey@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
  • Loading branch information
shentok authored and danielhb committed Dec 20, 2022
1 parent 30e1e0c commit 99c6bf1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hw/ppc/e500.c
Expand Up @@ -908,7 +908,7 @@ void ppce500_init(MachineState *machine)
bool kernel_as_payload;
hwaddr bios_entry = 0;
target_long payload_size;
struct boot_info *boot_info;
struct boot_info *boot_info = NULL;
int dt_size;
int i;
unsigned int smp_cpus = machine->smp.cpus;
Expand Down Expand Up @@ -963,7 +963,6 @@ void ppce500_init(MachineState *machine)
/* Register reset handler */
if (!i) {
/* Primary CPU */
struct boot_info *boot_info;
boot_info = g_new0(struct boot_info, 1);
qemu_register_reset(ppce500_cpu_reset, cpu);
env->load_info = boot_info;
Expand Down Expand Up @@ -1263,7 +1262,6 @@ void ppce500_init(MachineState *machine)
}
assert(dt_size < DTB_MAX_SIZE);

boot_info = env->load_info;
boot_info->entry = bios_entry;
boot_info->dt_base = dt_base;
boot_info->dt_size = dt_size;
Expand Down

0 comments on commit 99c6bf1

Please sign in to comment.