Skip to content

Commit b306398

Browse files
committed
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 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.
1 parent b150ae4 commit b306398

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/activity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static int memprof_posix_memalign_initial_handler(void **ptr, size_t al, size_t
282282
{
283283
if (in_memprof) {
284284
/* probably that dlsym() needs posix_memalign(), let's fail */
285-
return NULL;
285+
return ENOMEM;
286286
}
287287

288288
memprof_init();

0 commit comments

Comments
 (0)