From f6cb5a4826bcb496bfdf6fd3af7d0e52383ab131 Mon Sep 17 00:00:00 2001 From: Raef Coles Date: Mon, 10 Oct 2022 14:15:53 +0100 Subject: [PATCH] Fix LMS return statements having incorrect style Signed-off-by: Raef Coles --- library/lmots.c | 4 ++-- library/lms.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/lmots.c b/library/lmots.c index 163958795a..1e27024779 100644 --- a/library/lmots.c +++ b/library/lmots.c @@ -92,7 +92,7 @@ unsigned int mbedtls_lms_network_bytes_to_unsigned_int( size_t len, val |= ( ( unsigned int )bytes[idx] ) << (8 * ( len - 1 - idx ) ); } - return val; + return ( val ); } /* Calculate the checksum digits that are appended to the end of the LMOTS digit @@ -117,7 +117,7 @@ static unsigned short lmots_checksum_calculate( const mbedtls_lmots_parameters_t sum += DIGIT_MAX_VALUE - digest[idx]; } - return sum; + return ( sum ); } /* Create the string of digest digits (in the base determined by the Winternitz diff --git a/library/lms.c b/library/lms.c index 321e51abe1..b460353a67 100644 --- a/library/lms.c +++ b/library/lms.c @@ -736,7 +736,7 @@ int mbedtls_lms_sign( mbedtls_lms_private_t *ctx, if ( MBEDTLS_LMS_SIG_LEN(ctx->params.type, ctx->params.otstype) < SIG_OTS_SIG_OFFSET ) { - return MBEDTLS_ERR_LMS_BAD_INPUT_DATA; + return ( MBEDTLS_ERR_LMS_BAD_INPUT_DATA ); } ret = mbedtls_lmots_sign( &ctx->ots_private_keys[q_leaf_identifier],