From c9820b6e372e2124c96ba4f545bb667df534b376 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 12 May 2021 20:41:46 -0400 Subject: [PATCH] mark alloc_aligned_simple error path unlikely --- h_malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h_malloc.c b/h_malloc.c index eb7c4f6..c27c5b9 100644 --- a/h_malloc.c +++ b/h_malloc.c @@ -1304,7 +1304,7 @@ static int alloc_aligned(unsigned arena, void **memptr, size_t alignment, size_t static void *alloc_aligned_simple(unsigned arena, size_t alignment, size_t size) { void *ptr; int ret = alloc_aligned(arena, &ptr, alignment, size, 1); - if (ret) { + if (unlikely(ret)) { errno = ret; return NULL; }