From 126cfedba49b51fc96763f67bb7ceee727d6ff51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 2 Sep 2024 10:42:46 +0200 Subject: [PATCH] Fix code style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- library/bignum_core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/library/bignum_core.c b/library/bignum_core.c index c8b1474928..88582c2d38 100644 --- a/library/bignum_core.c +++ b/library/bignum_core.c @@ -781,8 +781,9 @@ static inline void exp_mod_calc_first_bit_optionally_safe(const mbedtls_mpi_uint *E_bit_index = E_bits % biL; #if defined(MBEDTLS_TEST_HOOKS) && !defined(MBEDTLS_THREADING_C) - if(mbedtls_unsafe_codepath_hook != NULL) + if (mbedtls_unsafe_codepath_hook != NULL) { mbedtls_unsafe_codepath_hook(); + } #endif } else { /* @@ -792,8 +793,9 @@ static inline void exp_mod_calc_first_bit_optionally_safe(const mbedtls_mpi_uint *E_limb_index = E_limbs; *E_bit_index = 0; #if defined(MBEDTLS_TEST_HOOKS) && !defined(MBEDTLS_THREADING_C) - if(mbedtls_safe_codepath_hook != NULL) + if (mbedtls_safe_codepath_hook != NULL) { mbedtls_safe_codepath_hook(); + } #endif } } @@ -812,8 +814,9 @@ static inline void exp_mod_table_lookup_optionally_safe(mbedtls_mpi_uint *Wselec if (window_public == MBEDTLS_MPI_IS_PUBLIC) { memcpy(Wselect, Wtable + window * AN_limbs, AN_limbs * ciL); #if defined(MBEDTLS_TEST_HOOKS) && !defined(MBEDTLS_THREADING_C) - if(mbedtls_unsafe_codepath_hook != NULL) + if (mbedtls_unsafe_codepath_hook != NULL) { mbedtls_unsafe_codepath_hook(); + } #endif } else { /* Select Wtable[window] without leaking window through @@ -821,8 +824,9 @@ static inline void exp_mod_table_lookup_optionally_safe(mbedtls_mpi_uint *Wselec mbedtls_mpi_core_ct_uint_table_lookup(Wselect, Wtable, AN_limbs, welem, window); #if defined(MBEDTLS_TEST_HOOKS) && !defined(MBEDTLS_THREADING_C) - if(mbedtls_safe_codepath_hook != NULL) + if (mbedtls_safe_codepath_hook != NULL) { mbedtls_safe_codepath_hook(); + } #endif } }