loader/i386/multiboot_mbi: Clean up redundant code

In grub-core/loader/i386/multiboot_mbi.c, Coverity spotted redundant code where
the variable err was being set to GRUB_ERR_NONE and then being overwritten
later without being used. Since this is unnecessary, we can remove the code
that sets err to GRUB_ERR_NONE.

Fixes: CID 428877

Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Alec Brown authored and Daniel Kiper committed 2024-01-25 18:13:33 +01:00
1 parent db0d19dc5f
commit d89a2a6e57
1 file changed
+1 -1
+1 -1
View File
@@ -86,7 +86,7 @@ load_kernel (grub_file_t file, const char *filename,
return GRUB_ERR_NONE; return GRUB_ERR_NONE;
} }
if (err == GRUB_ERR_UNKNOWN_OS && (header->flags & MULTIBOOT_AOUT_KLUDGE)) if (err == GRUB_ERR_UNKNOWN_OS && (header->flags & MULTIBOOT_AOUT_KLUDGE))
grub_errno = err = GRUB_ERR_NONE; grub_errno = GRUB_ERR_NONE;
} }
if (header->flags & MULTIBOOT_AOUT_KLUDGE) if (header->flags & MULTIBOOT_AOUT_KLUDGE)
{ {