From f76a678c049c8b45ada4990dac28e180ed3f2274 Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Tue, 19 Apr 2022 19:59:45 -0700 Subject: [PATCH] fix mi_likely macro in debug build --- src/alloc-aligned.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/alloc-aligned.c b/src/alloc-aligned.c index c686e936..4b4c43cb 100644 --- a/src/alloc-aligned.c +++ b/src/alloc-aligned.c @@ -105,8 +105,8 @@ mi_decl_nodiscard mi_decl_restrict void* mi_heap_malloc_aligned(mi_heap_t* heap, if mi_likely(_mi_is_power_of_two(size) && size >= alignment && size <= MI_SMALL_SIZE_MAX) #else // with padding, we can only guarantee this for fixed alignments - if (mi_likely((alignment == sizeof(void*) || (alignment == MI_MAX_ALIGN_SIZE && size > (MI_MAX_ALIGN_SIZE/2))) - && size <= MI_SMALL_SIZE_MAX)) + if mi_likely((alignment == sizeof(void*) || (alignment == MI_MAX_ALIGN_SIZE && size > (MI_MAX_ALIGN_SIZE/2))) + && size <= MI_SMALL_SIZE_MAX) #endif { // fast path for common alignment and size