]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
efi_loader: initialize 'total' variable
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Wed, 25 Jun 2025 17:15:28 +0000 (20:15 +0300)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 28 Jun 2025 11:03:19 +0000 (13:03 +0200)
This variable might end up being uninitialized if we exit early.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_bootmgr.c

index 1a3461f5a9d03cbda1a18ce3123e3e1e1e526809..83f4a3525bd1e5c9bfe8e4883f0fcaf3835fdfbb 100644 (file)
@@ -1133,7 +1133,7 @@ efi_status_t efi_bootmgr_update_media_device_boot_option(void)
 {
        u32 i;
        efi_status_t ret;
-       efi_uintn_t count, num, total;
+       efi_uintn_t count, num, total = 0;
        efi_handle_t *handles = NULL;
        struct eficonfig_media_boot_option *opt = NULL;