is_zero(): volatilize the accumulator

This commit is contained in:
Frank Denis 2017-07-16 01:07:38 +02:00
parent 3d400363b6
commit 1f826df2d4

View File

@ -185,7 +185,7 @@ 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];