Browse Source

Fix from review

Eric Blankenhorn 3 years ago
parent
commit
a3cbcf255f
2 changed files with 2 additions and 4 deletions
  1. 1 2
      examples/client/client.c
  2. 1 2
      examples/server/server.c

+ 1 - 2
examples/client/client.c

@@ -2414,8 +2414,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
         err_sys("unable to load static memory");
     }
 #else
-    else {
-        /* method is not NULL */
+    if (method != NULL) {
         ctx = wolfSSL_CTX_new(method(NULL));
         if (ctx == NULL)
             err_sys("unable to get ctx");

+ 1 - 2
examples/server/server.c

@@ -1729,8 +1729,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
             != WOLFSSL_SUCCESS)
         err_sys_ex(catastrophic, "unable to load static memory and create ctx");
 #else
-    else {
-        /* method is not NULL */
+    if (method != NULL) {
         ctx = SSL_CTX_new(method(NULL));
     }
 #endif /* WOLFSSL_STATIC_MEMORY */