From 24647c5cd2860d066ab66da676e4c1d9cfd3dbd1 Mon Sep 17 00:00:00 2001 From: Joe Subbiani Date: Fri, 20 Aug 2021 15:56:22 +0100 Subject: [PATCH] Minor coding style improvement Signed-off-by: Joe Subbiani --- library/ssl_cli.c | 4 +--- library/ssl_srv.c | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/library/ssl_cli.c b/library/ssl_cli.c index d9af4a141..b02a3a5e4 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -820,7 +820,6 @@ static int ssl_write_use_srtp_ext( mbedtls_ssl_context *ssl, profile_value ) ); MBEDTLS_PUT_UINT16_BE( profile_value, p, 0 ); p += 2; - } else { @@ -1415,8 +1414,7 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl ) /* No need to check for space here, because the extension * writing functions already took care of that. */ MBEDTLS_PUT_UINT16_BE( ext_len, p, 0 ); - p += 2; - p += ext_len; + p += 2 + ext_len; } ssl->out_msglen = p - buf; diff --git a/library/ssl_srv.c b/library/ssl_srv.c index 718d205ba..210e0d371 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -3014,8 +3014,7 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl ) if( ext_len > 0 ) { MBEDTLS_PUT_UINT16_BE( ext_len, p, 0 ); - p += 2; - p += ext_len; + p += 2 + ext_len; } #if defined(MBEDTLS_SSL_PROTO_SSL3)