grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Optimization calculation expression of Macro


From: Milo Wenxiang Niu
Subject: [PATCH] Optimization calculation expression of Macro
Date: Mon, 1 Apr 2019 05:31:07 -0400

From: ‘Milo Wenxiang Niu <address@hidden>

            * include/grub/kernel.h: <FOR_MODULES(var)>:
                        optimization expression that caculate next var.
---
 include/grub/kernel.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/grub/kernel.h b/include/grub/kernel.h
index 133a37c..fee7f66 100644
--- a/include/grub/kernel.h
+++ b/include/grub/kernel.h
@@ -104,7 +104,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 *)                                  \
-    (((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_uint32_t *) var) + (((struct grub_module_header *) var)->size + 
sizeof (grub_addr_t) -1) / sizeof (grub_uint32_t)))
 
 grub_addr_t grub_modules_get_end (void);
 
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]