[tor-commits] [tor/master] Fix a set of variable-shadowing warnings in curve25519-donna.c

nickm at torproject.org nickm at torproject.org
Thu Jul 28 14:22:51 UTC 2016


commit 0390e1a60cb91fa581ec568879bf300224db6322
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Jul 28 10:03:29 2016 -0400

    Fix a set of variable-shadowing warnings in curve25519-donna.c
---
 src/ext/curve25519_donna/curve25519-donna.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/ext/curve25519_donna/curve25519-donna.c b/src/ext/curve25519_donna/curve25519-donna.c
index 5a0c340..1c5a27a 100644
--- a/src/ext/curve25519_donna/curve25519-donna.c
+++ b/src/ext/curve25519_donna/curve25519-donna.c
@@ -483,7 +483,6 @@ fcontract(u8 *output, limb *input_limbs) {
   int i;
   int j;
   s32 input[10];
-  s32 mask;
 
   /* |input_limbs[i]| < 2^26, so it's valid to convert to an s32. */
   for (i = 0; i < 10; i++) {
@@ -572,7 +571,7 @@ fcontract(u8 *output, limb *input_limbs) {
   /* It still remains the case that input might be between 2^255-19 and 2^255.
    * In this case, input[1..9] must take their maximum value and input[0] must
    * be >= (2^255-19) & 0x3ffffff, which is 0x3ffffed. */
-  mask = s32_gte(input[0], 0x3ffffed);
+  s32 mask = s32_gte(input[0], 0x3ffffed);
   for (i = 1; i < 10; i++) {
     if ((i & 1) == 1) {
       mask &= s32_eq(input[i], 0x1ffffff);





More information about the tor-commits mailing list