From b8ed6e22f01084530da8918a7da50c7327fa1987 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 28 Jun 2024 19:47:46 +0200 Subject: [PATCH] boot: indent error code path, but leave main code path unindented --- src/boot/efi/boot.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index b3d9329926a..aca34a5145f 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -1664,9 +1664,16 @@ static void config_load_type1_entries( if (startswith(f->FileName, u"auto-")) continue; - err = file_read(entries_dir, f->FileName, 0, 0, &content, NULL); - if (err == EFI_SUCCESS) - boot_entry_add_type1(config, device, root_dir, u"\\loader\\entries", f->FileName, content, loaded_image_path); + err = file_read(entries_dir, + f->FileName, + /* offset= */ 0, + /* size= */ 0, + &content, + /* ret_size= */ NULL); + if (err != EFI_SUCCESS) + continue; + + boot_entry_add_type1(config, device, root_dir, u"\\loader\\entries", f->FileName, content, loaded_image_path); } } -- 2.47.3