File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 24
24
#include " mbedtls/platform.h"
25
25
26
26
int main () {
27
- int exit_code = MBEDTLS_EXIT_FAILURE;
27
+ int exit_code = MBEDTLS_EXIT_SUCCESS;
28
+ int ret;
28
29
29
- if ((exit_code = mbedtls_platform_setup (NULL )) != 0 ) {
30
- printf (" Platform initialization failed with error %d\n " , exit_code );
30
+ if ((ret = mbedtls_platform_setup (NULL )) != 0 ) {
31
+ printf (" Platform initialization failed with error %d\n " , ret );
31
32
return MBEDTLS_EXIT_FAILURE;
32
33
}
33
34
34
35
Authcrypt *authcrypt = new Authcrypt ();
35
36
36
- if ((exit_code = authcrypt->run ()) != 0 ) {
37
- mbedtls_printf (" Example failed with error %d\n " , exit_code );
37
+ if ((ret = authcrypt->run ()) != 0 ) {
38
+ mbedtls_printf (" Example failed with error %d\n " , ret );
38
39
exit_code = MBEDTLS_EXIT_FAILURE;
39
40
}
40
41
You can’t perform that action at this time.
0 commit comments