1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00

Rename local variables to not mask global names of same name. This

fixes lots of lint(1) warnings.
This commit is contained in:
Mark Murray 2003-06-05 13:17:32 +00:00
parent c2b9b6eba8
commit f2017a1921
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115872
3 changed files with 29 additions and 28 deletions

View File

@ -104,32 +104,32 @@ MD2_CTX *context; /* context */
const unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */
{
unsigned int i, index, partLen;
unsigned int i, idx, partLen;
/* Update number of bytes mod 16 */
index = context->count;
context->count = (index + inputLen) & 0xf;
idx = context->count;
context->count = (idx + inputLen) & 0xf;
partLen = 16 - index;
partLen = 16 - idx;
/* Transform as many times as possible.
*/
if (inputLen >= partLen) {
memcpy
((POINTER)&context->buffer[index], (POINTER)input, partLen);
((POINTER)&context->buffer[idx], (POINTER)input, partLen);
MD2Transform (context->state, context->checksum, context->buffer);
for (i = partLen; i + 15 < inputLen; i += 16)
MD2Transform (context->state, context->checksum, &input[i]);
index = 0;
idx = 0;
}
else
i = 0;
/* Buffer remaining input */
memcpy
((POINTER)&context->buffer[index], (POINTER)&input[i],
((POINTER)&context->buffer[idx], (POINTER)&input[i],
inputLen-i);
}
@ -138,12 +138,12 @@ unsigned int inputLen; /* length of input block */
void MD2Pad (context)
MD2_CTX *context; /* context */
{
unsigned int index, padLen;
unsigned int idx, padLen;
/* Pad out to multiple of 16.
*/
index = context->count;
padLen = 16 - index;
idx = context->count;
padLen = 16 - idx;
MD2Update (context, PADDING[padLen], padLen);
/* Extend with checksum */

View File

@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
#include "md4.h"
typedef unsigned char *POINTER;
typedef const unsigned char *CONST_POINTER;
typedef u_int16_t UINT2;
typedef u_int32_t UINT4;
@ -111,35 +112,35 @@ MD4_CTX *context; /* context */
const unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */
{
unsigned int i, index, partLen;
unsigned int i, idx, partLen;
/* Compute number of bytes mod 64 */
index = (unsigned int)((context->count[0] >> 3) & 0x3F);
idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
if ((context->count[0] += ((UINT4)inputLen << 3))
< ((UINT4)inputLen << 3))
context->count[1]++;
context->count[1] += ((UINT4)inputLen >> 29);
partLen = 64 - index;
partLen = 64 - idx;
/* Transform as many times as possible.
*/
if (inputLen >= partLen) {
memcpy
((POINTER)&context->buffer[index], (POINTER)input, partLen);
((POINTER)&context->buffer[idx], (CONST_POINTER)input, partLen);
MD4Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD4Transform (context->state, &input[i]);
index = 0;
idx = 0;
}
else
i = 0;
/* Buffer remaining input */
memcpy
((POINTER)&context->buffer[index], (POINTER)&input[i],
((POINTER)&context->buffer[idx], (CONST_POINTER)&input[i],
inputLen-i);
}
@ -148,15 +149,15 @@ void MD4Pad (context)
MD4_CTX *context; /* context */
{
unsigned char bits[8];
unsigned int index, padLen;
unsigned int idx, padLen;
/* Save number of bits */
Encode (bits, context->count, 8);
/* Pad out to 56 mod 64.
*/
index = (unsigned int)((context->count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index);
idx = (unsigned int)((context->count[0] >> 3) & 0x3f);
padLen = (idx < 56) ? (56 - idx) : (120 - idx);
MD4Update (context, PADDING, padLen);
/* Append length (before padding) */

View File

@ -152,10 +152,10 @@ MD5Update (context, input, inputLen)
const unsigned char *input;
unsigned int inputLen;
{
unsigned int i, index, partLen;
unsigned int i, idx, partLen;
/* Compute number of bytes mod 64 */
index = (unsigned int)((context->count[0] >> 3) & 0x3F);
idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
if ((context->count[0] += ((u_int32_t)inputLen << 3))
@ -163,24 +163,24 @@ MD5Update (context, input, inputLen)
context->count[1]++;
context->count[1] += ((u_int32_t)inputLen >> 29);
partLen = 64 - index;
partLen = 64 - idx;
/* Transform as many times as possible. */
if (inputLen >= partLen) {
memcpy((void *)&context->buffer[index], (const void *)input,
memcpy((void *)&context->buffer[idx], (const void *)input,
partLen);
MD5Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD5Transform (context->state, &input[i]);
index = 0;
idx = 0;
}
else
i = 0;
/* Buffer remaining input */
memcpy ((void *)&context->buffer[index], (const void *)&input[i],
memcpy ((void *)&context->buffer[idx], (const void *)&input[i],
inputLen-i);
}
@ -193,14 +193,14 @@ MD5Pad (context)
MD5_CTX *context;
{
unsigned char bits[8];
unsigned int index, padLen;
unsigned int idx, padLen;
/* Save number of bits */
Encode (bits, context->count, 8);
/* Pad out to 56 mod 64. */
index = (unsigned int)((context->count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index);
idx = (unsigned int)((context->count[0] >> 3) & 0x3f);
padLen = (idx < 56) ? (56 - idx) : (120 - idx);
MD5Update (context, PADDING, padLen);
/* Append length (before padding) */