From 0fcb10c71aa28854c5515417f4aefd2011de85d6 Mon Sep 17 00:00:00 2001 From: Guillaume Souchere Date: Tue, 9 Aug 2022 13:14:11 +0200 Subject: [PATCH] Remove the call to tlsf_assert in the tlsf_insist maccro In this commit: The call to tlsf_asssert is removed from tlsf_insist to allow the tlsf_check() function to return when one or more of the tlsf_insist() calls fails. In the previous implementation any failing tlsf_assist() was causing the tlsf_assert to terminate the execution of the application which doesn't allow the user to handle failures in tlsf_check() eventhough tlsf_check() returns a value. --- tlsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tlsf.c b/tlsf.c index 092553b..4255d10 100644 --- a/tlsf.c +++ b/tlsf.c @@ -618,7 +618,7 @@ typedef struct integrity_t int status; } integrity_t; -#define tlsf_insist(x) { tlsf_assert(x); if (!(x)) { status--; } } +#define tlsf_insist(x) { if (!(x)) { status--; } } static void integrity_walker(void* ptr, size_t size, int used, void* user) {