loader/i386/linux: Remove redundant code from in grub_cmd_linux()

The preferred_address has been assigned to GRUB_LINUX_BZIMAGE_ADDR
during initialization in grub_cmd_linux(). The assignment here
is redundant and should be removed.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Tianjia Zhang authored and Daniel Kiper committed 2021-03-02 17:41:32 +01:00
1 parent 30858eb59a
commit 2bcf005298
1 file changed
-3
-3
View File
@@ -751,14 +751,11 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
prot_init_space = page_align (prot_size); prot_init_space = page_align (prot_size);
if (relocatable) if (relocatable)
preferred_address = grub_le_to_cpu64 (lh.pref_address); preferred_address = grub_le_to_cpu64 (lh.pref_address);
else
preferred_address = GRUB_LINUX_BZIMAGE_ADDR;
} }
else else
{ {
min_align = align; min_align = align;
prot_size = prot_file_size; prot_size = prot_file_size;
preferred_address = GRUB_LINUX_BZIMAGE_ADDR;
/* Usually, the compression ratio is about 50%. */ /* Usually, the compression ratio is about 50%. */
prot_init_space = page_align (prot_size) * 3; prot_init_space = page_align (prot_size) * 3;
} }