diff options
author | Samuel Neves <sneves@dei.uc.pt> | 2015-05-29 14:40:07 +0300 |
---|---|---|
committer | Samuel Neves <sneves@dei.uc.pt> | 2015-05-29 14:44:26 +0300 |
commit | 105d4e49c62847ae033757e953572471bbfdb8c6 (patch) | |
tree | e35b7b0d5b919faf9b5fd0669e3934707c94ac61 /sse | |
parent | 5f615da00088e28419e39a66c79464db00688195 (diff) |
fix flags on architectures with < 32-bit int
Diffstat (limited to 'sse')
-rw-r--r-- | sse/blake2b.c | 8 | ||||
-rw-r--r-- | sse/blake2s.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sse/blake2b.c b/sse/blake2b.c index 1052264..041c2d2 100644 --- a/sse/blake2b.c +++ b/sse/blake2b.c @@ -65,13 +65,13 @@ static const uint8_t blake2b_sigma[12][16] = /* Some helper functions, not necessarily useful */ static inline int blake2b_set_lastnode( blake2b_state *S ) { - S->f[1] = ~0ULL; + S->f[1] = -1; return 0; } static inline int blake2b_clear_lastnode( blake2b_state *S ) { - S->f[1] = 0ULL; + S->f[1] = 0; return 0; } @@ -79,7 +79,7 @@ static inline int blake2b_set_lastblock( blake2b_state *S ) { if( S->last_node ) blake2b_set_lastnode( S ); - S->f[0] = ~0ULL; + S->f[0] = -1; return 0; } @@ -87,7 +87,7 @@ static inline int blake2b_clear_lastblock( blake2b_state *S ) { if( S->last_node ) blake2b_clear_lastnode( S ); - S->f[0] = 0ULL; + S->f[0] = 0; return 0; } diff --git a/sse/blake2s.c b/sse/blake2s.c index 909745c..8c32bc9 100644 --- a/sse/blake2s.c +++ b/sse/blake2s.c @@ -61,13 +61,13 @@ static const uint8_t blake2s_sigma[10][16] = /* Some helper functions, not necessarily useful */ static inline int blake2s_set_lastnode( blake2s_state *S ) { - S->f[1] = ~0U; + S->f[1] = -1; return 0; } static inline int blake2s_clear_lastnode( blake2s_state *S ) { - S->f[1] = 0U; + S->f[1] = 0; return 0; } @@ -75,7 +75,7 @@ static inline int blake2s_set_lastblock( blake2s_state *S ) { if( S->last_node ) blake2s_set_lastnode( S ); - S->f[0] = ~0U; + S->f[0] = -1; return 0; } @@ -83,7 +83,7 @@ static inline int blake2s_clear_lastblock( blake2s_state *S ) { if( S->last_node ) blake2s_clear_lastnode( S ); - S->f[0] = 0U; + S->f[0] = 0; return 0; } |