summaryrefslogtreecommitdiff
path: root/thirdparty/mbedtls/library/chacha20.c
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-07-10 16:15:01 +0200
committerRémi Verschelde <rverschelde@gmail.com>2019-07-11 08:32:07 +0200
commit6321cc8da3fb6dd5fd9ce3e6a1c5496c1c0d65ae (patch)
tree310d54a102e575fc5f6c414b2afe43ff5e0a45bc /thirdparty/mbedtls/library/chacha20.c
parent1abe12f5bb869605646797e043db88bb3d428e62 (diff)
mbedtls: Update to upstream version 2.16.2
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 )