:: commit 2be4a2f493eddcab1d72a358625ad881a51214b8

Mintsuki <mintsuki@protonmail.com> — 2026-04-13 14:15

parents: 5caf25ddd4

lib/misc: Remove dead overflow check in ALIGN_UP macro

diff --git a/common/lib/misc.h b/common/lib/misc.h
index 3551ddd1..60f709ef 100644
--- a/common/lib/misc.h
+++ b/common/lib/misc.h
@@ -100,7 +100,7 @@ uint64_t strtoui(const char *s, const char **end, int base);
 #define ALIGN_UP(x, a, onerror) ({ \
     __auto_type ALIGN_UP_value = (x); \
     __auto_type ALIGN_UP_align = (a); \
-    ALIGN_UP_value = CHECKED_MUL(DIV_ROUNDUP(ALIGN_UP_value, ALIGN_UP_align, onerror), ALIGN_UP_align, onerror); \
+    ALIGN_UP_value = DIV_ROUNDUP(ALIGN_UP_value, ALIGN_UP_align, onerror) * ALIGN_UP_align; \
     ALIGN_UP_value; \
 })
 
tab: 248 wrap: offon