mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 06:05:28 +00:00
Add more missing parentheses around macro parameters
This commit is contained in:
parent
3ac21aca9b
commit
9306f1c65d
|
@ -177,8 +177,8 @@ int mbedtls_internal_md4_process( mbedtls_md4_context *ctx,
|
|||
#define P(a,b,c,d,x,s) \
|
||||
do \
|
||||
{ \
|
||||
(a) += F(b,c,d) + (x) + 0x5A827999; \
|
||||
(a) = S(a,s); \
|
||||
(a) += F((b),(c),(d)) + (x) + 0x5A827999; \
|
||||
(a) = S((a),(s)); \
|
||||
} while( 0 )
|
||||
|
||||
P( A, B, C, D, X[ 0], 3 );
|
||||
|
@ -205,8 +205,8 @@ int mbedtls_internal_md4_process( mbedtls_md4_context *ctx,
|
|||
#define P(a,b,c,d,x,s) \
|
||||
do \
|
||||
{ \
|
||||
(a) += F(b,c,d) + (x) + 0x6ED9EBA1; \
|
||||
(a) = S(a,s); \
|
||||
(a) += F((b),(c),(d)) + (x) + 0x6ED9EBA1; \
|
||||
(a) = S((a),(s)); \
|
||||
} while( 0 )
|
||||
|
||||
P( A, B, C, D, X[ 0], 3 );
|
||||
|
|
|
@ -225,7 +225,7 @@ int mbedtls_internal_sha512_process( mbedtls_sha512_context *ctx,
|
|||
SHA512_VALIDATE_RET( (const unsigned char *)data != NULL );
|
||||
|
||||
#define SHR(x,n) ((x) >> (n))
|
||||
#define ROTR(x,n) (SHR(x,n) | ((x) << (64 - (n))))
|
||||
#define ROTR(x,n) (SHR((x),(n)) | ((x) << (64 - (n))))
|
||||
|
||||
#define S0(x) (ROTR(x, 1) ^ ROTR(x, 8) ^ SHR(x, 7))
|
||||
#define S1(x) (ROTR(x,19) ^ ROTR(x,61) ^ SHR(x, 6))
|
||||
|
|
Loading…
Reference in a new issue