From 10be134d8ef1e08862e1e2884dde3926e1435d0c Mon Sep 17 00:00:00 2001 From: David Horstmann Date: Thu, 6 Oct 2022 18:31:25 +0100 Subject: [PATCH] Refactor macro-spanning if in ssl_msg.c Signed-off-by: David Horstmann --- library/ssl_msg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/ssl_msg.c b/library/ssl_msg.c index dbef29b3f..f48f9f1b3 100644 --- a/library/ssl_msg.c +++ b/library/ssl_msg.c @@ -3851,8 +3851,8 @@ int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl, if( ssl_record_is_in_progress( ssl ) == 0 ) { + int dtls_have_buffered = 0; #if defined(MBEDTLS_SSL_PROTO_DTLS) - int have_buffered = 0; /* We only check for buffered messages if the * current datagram is fully consumed. */ @@ -3860,11 +3860,11 @@ int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl, ssl_next_record_is_in_datagram( ssl ) == 0 ) { if( ssl_load_buffered_message( ssl ) == 0 ) - have_buffered = 1; + dtls_have_buffered = 1; } - if( have_buffered == 0 ) #endif /* MBEDTLS_SSL_PROTO_DTLS */ + if( dtls_have_buffered == 0 ) { ret = ssl_get_next_record( ssl ); if( ret == MBEDTLS_ERR_SSL_CONTINUE_PROCESSING )