From 8508e50d3dbb61014a58e594ca46ee3ffb4c42a0 Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Tue, 16 May 2023 16:43:48 +0100 Subject: [PATCH] Make use of MBEDTLS_STATIC_ASSERT Signed-off-by: Dave Rodgman --- library/debug.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/debug.c b/library/debug.c index 8a5b28758..e3dfaefb0 100644 --- a/library/debug.c +++ b/library/debug.c @@ -70,9 +70,7 @@ void mbedtls_debug_print_msg(const mbedtls_ssl_context *ssl, int level, char str[DEBUG_BUF_SIZE]; int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; -#if defined(static_assert) - static_assert(DEBUG_BUF_SIZE >= 2) -#endif + MBEDTLS_STATIC_ASSERT(DEBUG_BUF_SIZE >= 2, "DEBUG_BUF_SIZE too small"); if (NULL == ssl || NULL == ssl->conf ||