mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-10-30 03:00:21 -04:00 
			
		
		
		
	Add explicit checks for non-zero result of platform setup in test suites
This commit is contained in:
		
							parent
							
								
									32a675f032
								
							
						
					
					
						commit
						a282270a10
					
				| @ -133,7 +133,7 @@ mbedtls_platform_context platform_ctx; | |||||||
| static int platform_setup() | static int platform_setup() | ||||||
| { | { | ||||||
| #if defined(MBEDTLS_PLATFORM_C) | #if defined(MBEDTLS_PLATFORM_C) | ||||||
|     if( mbedtls_platform_setup( &platform_ctx ) ) |     if( mbedtls_platform_setup( &platform_ctx ) != 0 ) | ||||||
|     { |     { | ||||||
|         return -1; |         return -1; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -282,7 +282,7 @@ int main(int argc, const char *argv[]) | |||||||
|     !defined(TEST_SUITE_MEMORY_BUFFER_ALLOC) |     !defined(TEST_SUITE_MEMORY_BUFFER_ALLOC) | ||||||
|     unsigned char alloc_buf[1000000]; |     unsigned char alloc_buf[1000000]; | ||||||
| #endif  | #endif  | ||||||
|     if( platform_setup() ) |     if( platform_setup() != 0 ) | ||||||
|     { |     { | ||||||
|         mbedtls_fprintf( stderr, "FATAL: Failed to initialize platform" ); |         mbedtls_fprintf( stderr, "FATAL: Failed to initialize platform" ); | ||||||
|         return -1; |         return -1; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Andrzej Kurek
						Andrzej Kurek