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:
Andrey Borzenkov authored and Andrei Borzenkov committed 2014-09-22 20:47:10 +04:00
1 parent 6d05b6383c
commit 954fe77163
26 files changed
+98 -93

No files matched your search

+2 -2
View File
@@ -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");