From 84eeb4fd96e724aedd4477f3faaadf0b5da268f9 Mon Sep 17 00:00:00 2001 From: Arto Kinnunen Date: Tue, 10 Sep 2019 10:32:30 +0300 Subject: [PATCH] Review corrections 5 -Remove unintentional type chaneg (size_t to uint32_t) -Follow mbedtls coding style in trace message --- library/ssl_cli.c | 2 +- library/ssl_tls.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ssl_cli.c b/library/ssl_cli.c index 6b240afdf..425d357d5 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -1707,7 +1707,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl ) } MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, current time: %lu", - (unsigned long)mbedtls_platform_get_uint32_be(&buf[2])) ); + (unsigned long)mbedtls_platform_get_uint32_be( &buf[2] ) ) ); memcpy( ssl->handshake->randbytes + 32, buf + 2, 32 ); diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 7f689afbf..c9d406420 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -5775,7 +5775,7 @@ static int ssl_load_buffered_message( mbedtls_ssl_context *ssl ) if( ( hs_buf->is_valid == 1 ) && ( hs_buf->is_complete == 1 ) ) { /* Synthesize a record containing the buffered HS message. */ - uint32_t msg_len = (uint32_t)mbedtls_platform_get_uint24_be( &hs_buf->data[1] ); + size_t msg_len = mbedtls_platform_get_uint24_be( &hs_buf->data[1] ); /* Double-check that we haven't accidentally buffered * a message that doesn't fit into the input buffer. */