]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/misc/bcm2835_property: Restrict scope of start_num, number, otp_row
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Jul 2024 13:10:28 +0000 (14:10 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Jul 2024 15:55:59 +0000 (16:55 +0100)
commit4b648238b8dd9870280b60ff32bf7fe2fe82607f
treede5d7f31fe9725f9e451ae6e700cac0e7e344bae
parent32f1c201eedf992c2ac8033d8af95f1ff1758a4d
hw/misc/bcm2835_property: Restrict scope of start_num, number, otp_row

In the long function bcm2835_property_mbox_push(), the variables
start_num, number and otp_row are used only in the four cases which
access OTP data, and their uses don't overlap with each other.

Make these variables have scope restricted to the cases where they're
used, so it's easier to read each individual case without having to
cross-refer up to the variable declaration at the top of the function
and check whether the variable is also used later in the loop.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240723131029.1159908-4-peter.maydell@linaro.org
hw/misc/bcm2835_property.c