diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function index 8e0312d55..6fa97adf0 100644 --- a/tests/suites/test_suite_x509parse.function +++ b/tests/suites/test_suite_x509parse.function @@ -457,7 +457,7 @@ void mbedtls_x509_crt_verify_chain( char *chain_paths, char *trusted_ca, int fl mbedtls_x509_crt_init( &chain ); mbedtls_x509_crt_init( &trusted ); - while( (act = strsep( &chain_paths, " " )) ) + while( ( act = strsep( &chain_paths, " " ) ) != NULL ) TEST_ASSERT( mbedtls_x509_crt_parse_file( &chain, act ) == 0 ); TEST_ASSERT( mbedtls_x509_crt_parse_file( &trusted, trusted_ca ) == 0 );