diff options
Diffstat (limited to 'payloads')
-rw-r--r-- | payloads/libpayload/libc/malloc.c | 2 |
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; |