mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-20 19:21:09 +01:00
Return from the test and utility examples via exit()
All the core examples have been modified not to return from main by the means of the return statement, but rather via exit() function, which was done to make the examples more bare metal friendly. This commit, for the sake of consistency, introduces the modifications to the test and utility examples. These, while less likely to be used in the low level environments, won't suffer from such a change.
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
int main( void )
|
||||
{
|
||||
mbedtls_printf("MBEDTLS_BASE64_C and/or MBEDTLS_FS_IO not defined.\n");
|
||||
return( 0 );
|
||||
mbedtls_exit( 0 );
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -290,6 +290,6 @@ exit:
|
||||
fflush( stdout ); getchar();
|
||||
#endif
|
||||
|
||||
return( exit_code );
|
||||
mbedtls_exit( exit_code );
|
||||
}
|
||||
#endif /* MBEDTLS_BASE64_C && MBEDTLS_FS_IO */
|
||||
|
||||
Reference in New Issue
Block a user