From 73628f5f2fc81863863e544f3465f11ab9d29c28 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Tue, 25 May 2021 11:23:13 +0200 Subject: [PATCH] coap_mbedtls.c: Remove redundant NULL pointer check As ssl_data is set to the address of the ssl_data component of m_env, there is no need for a NULL pointer check here. This fixes CID 1504920. --- src/coap_mbedtls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coap_mbedtls.c b/src/coap_mbedtls.c index bada857c..a0e404a7 100644 --- a/src/coap_mbedtls.c +++ b/src/coap_mbedtls.c @@ -1875,7 +1875,7 @@ int coap_dtls_hello(coap_session_t *c_session, ret = 0; } - if (ssl_data && ssl_data->pdu_len) { + if (ssl_data->pdu_len) { /* pdu data is held on stack which will not stay there */ coap_log(LOG_DEBUG, "coap_dtls_hello: ret %d: remaining data %u\n", ret, ssl_data->pdu_len); ssl_data->pdu_len = 0;