is_zero(): volatilize the accumulator
This commit is contained in:
parent
3d400363b6
commit
1f826df2d4
@ -184,8 +184,8 @@ sodium_compare(const unsigned char *b1_, const unsigned char *b2_, size_t len)
|
|||||||
int
|
int
|
||||||
sodium_is_zero(const unsigned char *n, const size_t nlen)
|
sodium_is_zero(const unsigned char *n, const size_t nlen)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
unsigned char d = 0U;
|
volatile unsigned char d = 0U;
|
||||||
|
|
||||||
for (i = 0U; i < nlen; i++) {
|
for (i = 0U; i < nlen; i++) {
|
||||||
d |= n[i];
|
d |= n[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user