mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
cleanup: grub_cpu_to_XXX_compile_time for constants
This tries to catch all cases where grub_cpu_to_XXX was used for constant expressions (including sizeof).
This commit is contained in:
1 parent
6d05b6383c
commit
954fe77163
26 files changed
+98
-93
No files matched your search
@@ -38,8 +38,8 @@ grub_xen_file (grub_file_t file)
|
||||
if (grub_file_read (file, &lh, sizeof (lh)) != sizeof (lh))
|
||||
goto fail;
|
||||
|
||||
if (lh.boot_flag != grub_cpu_to_le16 (0xaa55)
|
||||
|| lh.header != grub_cpu_to_le32 (GRUB_LINUX_MAGIC_SIGNATURE)
|
||||
if (lh.boot_flag != grub_cpu_to_le16_compile_time (0xaa55)
|
||||
|| lh.header != grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC_SIGNATURE)
|
||||
|| grub_le_to_cpu16 (lh.version) < 0x0208)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_OS, "version too old for xen boot");
|
||||
|
||||
Reference in new issue
Block a user