Add explicit checks for non-zero result of platform setup in test suites
diff --git a/tests/suites/helpers.function b/tests/suites/helpers.function
index e716318..c436fbb 100644
--- a/tests/suites/helpers.function
+++ b/tests/suites/helpers.function
@@ -133,7 +133,7 @@
static int platform_setup()
{
#if defined(MBEDTLS_PLATFORM_C)
- if( mbedtls_platform_setup( &platform_ctx ) )
+ if( mbedtls_platform_setup( &platform_ctx ) != 0 )
{
return -1;
}
diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function
index e5b4043..8d7e477 100644
--- a/tests/suites/main_test.function
+++ b/tests/suites/main_test.function
@@ -282,7 +282,7 @@
!defined(TEST_SUITE_MEMORY_BUFFER_ALLOC)
unsigned char alloc_buf[1000000];
#endif
- if( platform_setup() )
+ if( platform_setup() != 0 )
{
mbedtls_fprintf( stderr, "FATAL: Failed to initialize platform" );
return -1;