:: commit 104399fe43b578d3877c8a4f7333c145ba920f07

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

parents: b2cc8b74a6

lib/misc: Remove dead overflow check in ALIGN_UP macro

diff --git a/common/lib/misc.h b/common/lib/misc.h
index e733105b..1e8286c5 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