GET macros use a target variable
The GET macros used to write to a macro parameter, but now
they can be used to assign a value to the desired variable
rather than pass it in as an argument and have it modified
in the macro function.
Due to this MBEDTLS_BYTES_TO_U32_LE is the same as
MBEDTLS_GET_UINT32_LE and was there for replaced in the
appropriate files and removed from common.h
Signed-off-by: Joe Subbiani <joe.subbiani@arm.com>
diff --git a/library/gcm.c b/library/gcm.c
index bccecc0..948268c 100644
--- a/library/gcm.c
+++ b/library/gcm.c
@@ -88,12 +88,12 @@
return( ret );
/* pack h as two 64-bits ints, big-endian */
- MBEDTLS_GET_UINT32_BE( hi, h, 0 );
- MBEDTLS_GET_UINT32_BE( lo, h, 4 );
+ hi = MBEDTLS_GET_UINT32_BE( h, 0 );
+ lo = MBEDTLS_GET_UINT32_BE( h, 4 );
vh = (uint64_t) hi << 32 | lo;
- MBEDTLS_GET_UINT32_BE( hi, h, 8 );
- MBEDTLS_GET_UINT32_BE( lo, h, 12 );
+ hi = MBEDTLS_GET_UINT32_BE( h, 8 );
+ lo = MBEDTLS_GET_UINT32_BE( h, 12 );
vl = (uint64_t) hi << 32 | lo;
/* 8 = 1000 corresponds to 1 in GF(2^128) */