Modify tests to make analyzers happy

pull/7867/head
Colton Willey 2024-08-14 14:33:38 -07:00
parent 15abea7f20
commit dcf3af5382
1 changed files with 4 additions and 4 deletions

View File

@ -77292,10 +77292,10 @@ static int test_wolfSSL_set_SSL_CTX(void)
ExpectIntEQ(XMEMCMP(ssl->sessionCtx, session_id2, 4), 0); ExpectIntEQ(XMEMCMP(ssl->sessionCtx, session_id2, 4), 0);
#endif #endif
#ifdef WOLFSSL_COPY_CERT #ifdef WOLFSSL_COPY_CERT
if (ctx2->certificate != NULL) { if (ctx2 != NULL && ctx2->certificate != NULL) {
ExpectFalse(ssl->buffers.certificate == ctx2->certificate); ExpectFalse(ssl->buffers.certificate == ctx2->certificate);
} }
if (ctx2->certChain != NULL) { if (ctx2 != NULL && ctx2->certChain != NULL) {
ExpectFalse(ssl->buffers.certChain == ctx2->certChain); ExpectFalse(ssl->buffers.certChain == ctx2->certChain);
} }
#else #else
@ -77320,10 +77320,10 @@ static int test_wolfSSL_set_SSL_CTX(void)
/* MUST change */ /* MUST change */
#ifdef WOLFSSL_INT_H #ifdef WOLFSSL_INT_H
#ifdef WOLFSSL_COPY_CERT #ifdef WOLFSSL_COPY_CERT
if (ctx1->certificate != NULL) { if (ctx1 != NULL && ctx1->certificate != NULL) {
ExpectFalse(ssl->buffers.certificate == ctx1->certificate); ExpectFalse(ssl->buffers.certificate == ctx1->certificate);
} }
if (ctx1->certChain != NULL) { if (ctx1 != NULL && ctx1->certChain != NULL) {
ExpectFalse(ssl->buffers.certChain == ctx1->certChain); ExpectFalse(ssl->buffers.certChain == ctx1->certChain);
} }
#else #else