summaryrefslogtreecommitdiff
path: root/thirdparty/mbedtls/library/chacha20.c
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/mbedtls/library/chacha20.c')
-rw-r--r--thirdparty/mbedtls/library/chacha20.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/thirdparty/mbedtls/library/chacha20.c b/thirdparty/mbedtls/library/chacha20.c
index 0757163e2f..8a3610f0e0 100644
--- a/thirdparty/mbedtls/library/chacha20.c
+++ b/thirdparty/mbedtls/library/chacha20.c
@@ -60,14 +60,14 @@
MBEDTLS_INTERNAL_VALIDATE( cond )
#define BYTES_TO_U32_LE( data, offset ) \
- ( (uint32_t) data[offset] \
- | (uint32_t) ( (uint32_t) data[( offset ) + 1] << 8 ) \
- | (uint32_t) ( (uint32_t) data[( offset ) + 2] << 16 ) \
- | (uint32_t) ( (uint32_t) data[( offset ) + 3] << 24 ) \
+ ( (uint32_t) (data)[offset] \
+ | (uint32_t) ( (uint32_t) (data)[( offset ) + 1] << 8 ) \
+ | (uint32_t) ( (uint32_t) (data)[( offset ) + 2] << 16 ) \
+ | (uint32_t) ( (uint32_t) (data)[( offset ) + 3] << 24 ) \
)
#define ROTL32( value, amount ) \
- ( (uint32_t) ( value << amount ) | ( value >> ( 32 - amount ) ) )
+ ( (uint32_t) ( (value) << (amount) ) | ( (value) >> ( 32 - (amount) ) ) )
#define CHACHA20_CTR_INDEX ( 12U )