From b21bbef06187b521df31151c1795716684400cef Mon Sep 17 00:00:00 2001 From: David Horstmann Date: Thu, 6 Oct 2022 17:49:31 +0100 Subject: [PATCH] Refactor macro-spanning if in ssl_tls12_client.c Signed-off-by: David Horstmann --- library/ssl_tls12_client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/ssl_tls12_client.c b/library/ssl_tls12_client.c index d1ec55cfcb..ba39d89813 100644 --- a/library/ssl_tls12_client.c +++ b/library/ssl_tls12_client.c @@ -2471,9 +2471,11 @@ start_processing: if( ret != 0 ) { + int send_alert_msg = 1; #if defined(MBEDTLS_SSL_ECP_RESTARTABLE_ENABLED) - if( ret != MBEDTLS_ERR_ECP_IN_PROGRESS ) + send_alert_msg = ( ret != MBEDTLS_ERR_ECP_IN_PROGRESS ); #endif + if( send_alert_msg ) mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,