Fix warning on some compilers where variable index shadows a global
authorMatt Caswell <matt@openssl.org>
Tue, 27 Jan 2015 16:39:13 +0000 (16:39 +0000)
committerMatt Caswell <matt@openssl.org>
Wed, 28 Jan 2015 10:57:14 +0000 (10:57 +0000)
declaration

Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/modes/ocb128.c

index a3224108c3585789ee984add0f4a4d5b3033fe61..cbcb7f62dde79a3e16529d44f45b24227585c324 100644 (file)
@@ -151,10 +151,10 @@ static void ocb_block_xor(const unsigned char *in1,
  * Lookup L_index in our lookup table. If we haven't already got it we need to
  * calculate it
  */
  * Lookup L_index in our lookup table. If we haven't already got it we need to
  * calculate it
  */
-static OCB_BLOCK *ocb_lookup_l(OCB128_CONTEXT *ctx, size_t index)
+static OCB_BLOCK *ocb_lookup_l(OCB128_CONTEXT *ctx, size_t idx)
 {
 {
-    if (index <= ctx->l_index) {
-        return ctx->l + index;
+    if (idx <= ctx->l_index) {
+        return ctx->l + idx;
     }
 
     /* We don't have it - so calculate it */
     }
 
     /* We don't have it - so calculate it */
@@ -166,9 +166,9 @@ static OCB_BLOCK *ocb_lookup_l(OCB128_CONTEXT *ctx, size_t index)
         if (!ctx->l)
             return NULL;
     }
         if (!ctx->l)
             return NULL;
     }
-    ocb_double(ctx->l + (index - 1), ctx->l + index);
+    ocb_double(ctx->l + (idx - 1), ctx->l + idx);
 
 
-    return ctx->l + index;
+    return ctx->l + idx;
 }
 
 /*
 }
 
 /*