add parenthese in macro
This commit is contained in:
parent
79d6e61aca
commit
b0f06ed1ec
@ -45,14 +45,14 @@ const struct ltc_hash_descriptor whirlpool_desc =
|
||||
|
||||
/* shortcut macro to perform three functions at once */
|
||||
#define theta_pi_gamma(a, i) \
|
||||
SB0(GB(a, i-0, 7)) ^ \
|
||||
(SB0(GB(a, i-0, 7)) ^ \
|
||||
SB1(GB(a, i-1, 6)) ^ \
|
||||
SB2(GB(a, i-2, 5)) ^ \
|
||||
SB3(GB(a, i-3, 4)) ^ \
|
||||
SB4(GB(a, i-4, 3)) ^ \
|
||||
SB5(GB(a, i-5, 2)) ^ \
|
||||
SB6(GB(a, i-6, 1)) ^ \
|
||||
SB7(GB(a, i-7, 0))
|
||||
SB7(GB(a, i-7, 0)))
|
||||
|
||||
#ifdef LTC_CLEAN_STACK
|
||||
static int _whirlpool_compress(hash_state *md, unsigned char *buf)
|
||||
|
@ -267,7 +267,7 @@ static inline ulong32 ROR(ulong32 word, int i)
|
||||
#ifndef LTC_NO_ROLC
|
||||
|
||||
#define ROLc(word,i) ({ \
|
||||
ulong32 __ROLc_tmp = word; \
|
||||
ulong32 __ROLc_tmp = (word); \
|
||||
__asm__ ("roll %2, %0" : \
|
||||
"=r" (__ROLc_tmp) : \
|
||||
"0" (__ROLc_tmp), \
|
||||
@ -275,7 +275,7 @@ static inline ulong32 ROR(ulong32 word, int i)
|
||||
__ROLc_tmp; \
|
||||
})
|
||||
#define RORc(word,i) ({ \
|
||||
ulong32 __RORc_tmp = word; \
|
||||
ulong32 __RORc_tmp = (word); \
|
||||
__asm__ ("rorl %2, %0" : \
|
||||
"=r" (__RORc_tmp) : \
|
||||
"0" (__RORc_tmp), \
|
||||
|
Loading…
Reference in New Issue
Block a user