summaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/libc/malloc.c')
-rw-r--r--payloads/libpayload/libc/malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/libc/malloc.c b/payloads/libpayload/libc/malloc.c
index 1d99a9c4b6..edda0b424f 100644
--- a/payloads/libpayload/libc/malloc.c
+++ b/payloads/libpayload/libc/malloc.c
@@ -130,7 +130,7 @@ static void *alloc(int len, struct memory_type *type)
hdrtype_t volatile *ptr = (hdrtype_t volatile *)type->start;
/* Align the size. */
- len = (len + HDRSIZE - 1) & ~(HDRSIZE - 1);
+ len = ALIGN_UP(len, HDRSIZE);
if (!len || len > MAX_SIZE)
return (void *)NULL;