[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] loader/linux: Fix type error for reference variable
From: |
Daniel Kiper |
Subject: |
Re: [PATCH] loader/linux: Fix type error for reference variable |
Date: |
Fri, 26 Feb 2021 20:23:12 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Mon, Jan 11, 2021 at 11:04:36AM +0800, Tianjia Zhang wrote:
> `relocatable` is defined as type grub_uint8_t, this is also
> one byte definition in linux boot protocol. by semantic
> definition, it is a bool type. It is not appropriate to
> treat it as a four bytes, this patch fix this issue.
>
> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel
> ---
> grub-core/loader/i386/linux.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
> index d7e68658f..3a06785b2 100644
> --- a/grub-core/loader/i386/linux.c
> +++ b/grub-core/loader/i386/linux.c
> @@ -736,7 +736,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__
> ((unused)),
> for (align = 0; align < 32; align++)
> if (grub_le_to_cpu32 (lh.kernel_alignment) & (1 << align))
> break;
> - relocatable = grub_le_to_cpu32 (lh.relocatable);
> + relocatable = lh.relocatable;
> }
> else
> {
> --
> 2.19.1.3.ge56e4f7
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] loader/linux: Fix type error for reference variable,
Daniel Kiper <=