mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-27 04:54:15 +01:00
Add implementation for MPS assertion macros
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
parent
0ea0db4368
commit
75ac1f7b95
@ -52,6 +52,24 @@
|
|||||||
/*! This flag controls whether tracing for MPS should be enabled. */
|
/*! This flag controls whether tracing for MPS should be enabled. */
|
||||||
//#define MBEDTLS_MPS_TRACE
|
//#define MBEDTLS_MPS_TRACE
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_MPS_ENABLE_ASSERTIONS)
|
||||||
|
|
||||||
|
#define MBEDTLS_MPS_ASSERT_RAW( cond, string ) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
if( !(cond) ) \
|
||||||
|
{ \
|
||||||
|
TRACE( trace_error, string ); \
|
||||||
|
RETURN( MBEDTLS_ERR_MPS_INTERNAL_ERROR ); \
|
||||||
|
} \
|
||||||
|
} while( 0 )
|
||||||
|
|
||||||
|
#else /* MBEDTLS_MPS_ENABLE_ASSERTIONS */
|
||||||
|
|
||||||
|
#define MBEDTLS_MPS_ASSERT_RAW( cond, string ) do {} while( 0 )
|
||||||
|
|
||||||
|
#endif /* MBEDTLS_MPS_ENABLE_ASSERTIONS */
|
||||||
|
|
||||||
/* \} name SECTION: MPS Configuration */
|
/* \} name SECTION: MPS Configuration */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user