From a074aa6ad158c90a065d5b9f7727a07254f0e6b2 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 21 Jan 2013 22:44:20 +0100 Subject: [PATCH 139/482] * include/grub/kernel.h (FOR_MODULES): Adjust to preserve alignment invariants. --- ChangeLog | 5 +++++ include/grub/kernel.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a2edbc5..c3405df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-01-21 Vladimir Serbinenko + + * include/grub/kernel.h (FOR_MODULES): Adjust to preserve alignment + invariants. + 2013-01-21 Colin Watson * grub-core/font/font.c (blit_comb: do_blit): Make static instead of diff --git a/include/grub/kernel.h b/include/grub/kernel.h index 033479e..23e4f02 100644 --- a/include/grub/kernel.h +++ b/include/grub/kernel.h @@ -78,7 +78,7 @@ extern grub_addr_t EXPORT_VAR (grub_modbase); var && (grub_addr_t) var \ < (grub_modbase + (((struct grub_module_info *) grub_modbase)->size)); \ var = (struct grub_module_header *) \ - ((void **) var + (((struct grub_module_header *) var)->size + sizeof (void *) - 1) / sizeof (void *))) + (((grub_uint32_t *) var) + ((((struct grub_module_header *) var)->size + sizeof (grub_addr_t) - 1) / sizeof (grub_addr_t)) * (sizeof (grub_addr_t) / sizeof (grub_uint32_t)))) grub_addr_t grub_modules_get_end (void); -- 1.8.2.1