From e2159f2083c84a213d250a502da700c2f91fe92c Mon Sep 17 00:00:00 2001 From: Tom Cosgrove Date: Thu, 15 Sep 2022 14:40:10 +0100 Subject: [PATCH] Use the MAX() macro Signed-off-by: Tom Cosgrove --- tests/suites/test_suite_mpi.function | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/suites/test_suite_mpi.function b/tests/suites/test_suite_mpi.function index 72b8e852f9..0a31f9576b 100644 --- a/tests/suites/test_suite_mpi.function +++ b/tests/suites/test_suite_mpi.function @@ -1863,7 +1863,7 @@ void mpi_core_sub( char * input_A, char * input_B, TEST_EQUAL( 1, X8.s ); /* Get the number of limbs we will need */ - size_t limbs = ( A.n < B.n ) ? B.n : A.n; + size_t limbs = MAX( A.n, B.n ); size_t bytes = limbs * sizeof(mbedtls_mpi_uint); /* We only need to work with X4 or X8, depending on sizeof(mbedtls_mpi_uint) */ @@ -1971,7 +1971,7 @@ void mpi_core_mla( char * input_A, char * input_B, char * input_S, TEST_EQUAL( 1, cy->s ); /* Get the (max) number of limbs we will need */ - size_t limbs = ( A.n < B.n ) ? B.n : A.n; + size_t limbs = MAX( A.n, B.n ); size_t bytes = limbs * sizeof(mbedtls_mpi_uint); /* The result shouldn't have more limbs than the longest input */