The compiler's statis_assert allows for a much better error message than
the current error message about negatively sized arrays.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 common/tlsf.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/common/tlsf.c b/common/tlsf.c
index e7f1b8354f02..cb380dcf87c4 100644
--- a/common/tlsf.c
+++ b/common/tlsf.c
@@ -77,10 +77,7 @@ enum tlsf_private
 ** Static assertion mechanism.
 */
 
-#define _tlsf_glue2(x, y) x ## y
-#define _tlsf_glue(x, y) _tlsf_glue2(x, y)
-#define tlsf_static_assert(exp) \
-       typedef char _tlsf_glue(static_assert, __LINE__) [(exp) ? 1 : -1]
+#define tlsf_static_assert static_assert
 
 /* This code has been tested on 32- and 64-bit (LP/LLP) architectures. */
 tlsf_static_assert(sizeof(int) * CHAR_BIT == 32);
-- 
2.47.3


Reply via email to