Skip to content

Commit

Permalink
Make use of MBEDTLS_STATIC_ASSERT
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
  • Loading branch information
daverodgman committed May 16, 2023
1 parent 0019178 commit bd77182
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions library/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit bd77182

Please sign in to comment.