Skip to content

Commit

Permalink
BUILD: activity/memprofile: fix a build warning in the posix_memalign…
Browse files Browse the repository at this point in the history
… handler

A "return NULL" statement was placed for error handling in the
posix_memalign() handler instead of an int errno value, by recent
commit 5ddc8b3 ("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 b306398)
Signed-off-by: Christopher Faulet <[email protected]>
  • Loading branch information
wtarreau authored and capflam committed Jan 9, 2025
1 parent 3985fa4 commit 8abed46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/activity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8abed46

Please sign in to comment.