From 850a0797cab8004105bae9b2ed02fc324311d784 Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Mon, 22 May 2023 12:05:03 +0100 Subject: [PATCH] Remove extraneous check in for loop condition Issue 7529 uncovered an unrequired check in a for loop condition in ssl_tls.c. This commit removes said check. Signed-off-by: Thomas Daubney --- library/ssl_tls.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index fe666e88cc..7f35c74571 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -1155,8 +1155,7 @@ static int ssl_handshake_init(mbedtls_ssl_context *ssl) size_t length; const mbedtls_ecp_group_id *curve_list = ssl->conf->curve_list; - for (length = 0; (curve_list[length] != MBEDTLS_ECP_DP_NONE) && - (length < MBEDTLS_ECP_DP_MAX); length++) { + for (length = 0; (curve_list[length] != MBEDTLS_ECP_DP_NONE); length++) { } /* Leave room for zero termination */