Skip to content

Commit dcf3af5

Browse files
committed
Modify tests to make analyzers happy
1 parent 15abea7 commit dcf3af5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/api.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77292,10 +77292,10 @@ static int test_wolfSSL_set_SSL_CTX(void)
7729277292
ExpectIntEQ(XMEMCMP(ssl->sessionCtx, session_id2, 4), 0);
7729377293
#endif
7729477294
#ifdef WOLFSSL_COPY_CERT
77295-
if (ctx2->certificate != NULL) {
77295+
if (ctx2 != NULL && ctx2->certificate != NULL) {
7729677296
ExpectFalse(ssl->buffers.certificate == ctx2->certificate);
7729777297
}
77298-
if (ctx2->certChain != NULL) {
77298+
if (ctx2 != NULL && ctx2->certChain != NULL) {
7729977299
ExpectFalse(ssl->buffers.certChain == ctx2->certChain);
7730077300
}
7730177301
#else
@@ -77320,10 +77320,10 @@ static int test_wolfSSL_set_SSL_CTX(void)
7732077320
/* MUST change */
7732177321
#ifdef WOLFSSL_INT_H
7732277322
#ifdef WOLFSSL_COPY_CERT
77323-
if (ctx1->certificate != NULL) {
77323+
if (ctx1 != NULL && ctx1->certificate != NULL) {
7732477324
ExpectFalse(ssl->buffers.certificate == ctx1->certificate);
7732577325
}
77326-
if (ctx1->certChain != NULL) {
77326+
if (ctx1 != NULL && ctx1->certChain != NULL) {
7732777327
ExpectFalse(ssl->buffers.certChain == ctx1->certChain);
7732877328
}
7732977329
#else

0 commit comments

Comments
 (0)