Skip to content

Commit 7c78056

Browse files
Andrzej KurekPatater
authored andcommitted
Add explicit checks for non-zero result of platform setup
1 parent f9d17b3 commit 7c78056

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

authcrypt/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
int main() {
2727
mbedtls_platform_context platform_ctx;
28-
if(mbedtls_platform_setup(&platform_ctx)) {
28+
if(mbedtls_platform_setup(&platform_ctx) != 0) {
2929
return -1;
3030
}
3131

benchmark/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ static int benchmark( int argc, char *argv[] )
962962

963963
int main(void) {
964964
mbedtls_platform_context platform_ctx;
965-
if(mbedtls_platform_setup(&platform_ctx)) {
965+
if(mbedtls_platform_setup(&platform_ctx) != 0) {
966966
return -1;
967967
}
968968

hashing/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static int example(void)
153153

154154
int main() {
155155
mbedtls_platform_context platform_ctx;
156-
if( mbedtls_platform_setup(&platform_ctx)) {
156+
if(mbedtls_platform_setup(&platform_ctx) != 0) {
157157
return -1;
158158
}
159159

tls-client/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const int SERVER_PORT = 443;
5050
int main()
5151
{
5252
mbedtls_platform_context platform_ctx;
53-
if( mbedtls_platform_setup(&platform_ctx)) {
53+
if(mbedtls_platform_setup(&platform_ctx) != 0) {
5454
return -1;
5555
}
5656
/*

0 commit comments

Comments
 (0)