From 4fd66e3ad7ed371bfe1bb5006dd357d8a3741144 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 17 Aug 2017 14:13:13 +0200 Subject: [PATCH] Name similar things the same way in sodium_pad() and sodium_unpad() --- src/libsodium/sodium/utils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libsodium/sodium/utils.c b/src/libsodium/sodium/utils.c index cf1bf923..3606f13a 100644 --- a/src/libsodium/sodium/utils.c +++ b/src/libsodium/sodium/utils.c @@ -629,7 +629,7 @@ sodium_pad(size_t *padded_buflen_p, unsigned char *buf, size_t xpadlen; size_t xpadded_len; volatile unsigned char mask; - unsigned char i_eq_xpad_mask; + unsigned char barrier_mask; if (blocksize <= 0U) { return -1; @@ -648,9 +648,9 @@ sodium_pad(size_t *padded_buflen_p, unsigned char *buf, *padded_buflen_p = xpadded_len + 1U; mask = 0U; for (i = 0; i < blocksize; i++) { - i_eq_xpad_mask = (unsigned char) (((i ^ xpadlen) - 1U) >> 8); - tail[-i] = (tail[-i] & mask) | (0x80 & i_eq_xpad_mask); - mask |= i_eq_xpad_mask; + barrier_mask = (unsigned char) (((i ^ xpadlen) - 1U) >> 8); + tail[-i] = (tail[-i] & mask) | (0x80 & barrier_mask); + mask |= barrier_mask; } return 0; }