Unify the example programs' termination
This is done to account for platforms, for which we want custom behavior
upon the program termination, hence we call `mbedtls_exit()` instead of
returning from `main()`.
diff --git a/programs/test/selftest.c b/programs/test/selftest.c
index 727054e..43add34 100644
--- a/programs/test/selftest.c
+++ b/programs/test/selftest.c
@@ -418,6 +418,5 @@
mbedtls_exit( MBEDTLS_EXIT_FAILURE );
/* return() is here to prevent compiler warnings */
- return( MBEDTLS_EXIT_SUCCESS );
+ mbedtls_exit( MBEDTLS_EXIT_SUCCESS );
}
-
diff --git a/programs/test/udp_proxy.c b/programs/test/udp_proxy.c
index 979910e..732a7ed 100644
--- a/programs/test/udp_proxy.c
+++ b/programs/test/udp_proxy.c
@@ -179,7 +179,7 @@
mbedtls_printf( " option %s: illegal value: %s\n", name, value );
mbedtls_printf( USAGE );
- exit( 1 );
+ mbedtls_exit( 1 );
}
static void get_options( int argc, char *argv[] )