From 8abed46c7d7be29bce71b3db8dbc28a0d64c900b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 22 Nov 2024 09:41:02 +0100 Subject: [PATCH] BUILD: activity/memprofile: fix a build warning in the posix_memalign handler A "return NULL" statement was placed for error handling in the posix_memalign() handler instead of an int errno value, by recent commit 5ddc8b3ad4 ("MINOR: activity/memprofile: monitor non-portable calls as well"). Surprisingly the warning only triggered on gcc-4.8. Let's use ENOMEM instead. No backport needed. (cherry picked from commit b30639848e502f79829abc28c8093aa0e34ba1f9) Signed-off-by: Christopher Faulet --- src/activity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activity.c b/src/activity.c index 7e783accfddca..13b3428192fcf 100644 --- a/src/activity.c +++ b/src/activity.c @@ -282,7 +282,7 @@ static int memprof_posix_memalign_initial_handler(void **ptr, size_t al, size_t { if (in_memprof) { /* probably that dlsym() needs posix_memalign(), let's fail */ - return NULL; + return ENOMEM; } memprof_init();