summaryrefslogtreecommitdiffstats
path: root/crypto/hmac/hmac.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2003-10-29 20:24:15 +0000
committerGeoff Thorpe <geoff@openssl.org>2003-10-29 20:24:15 +0000
commit27545970134d703ed96027aac9b67eced124eec3 (patch)
tree2f878acf303cc26e3b6db6a0ec25c10c91e3d32d /crypto/hmac/hmac.c
parent2ce90b9b7481381dff584726d84345a0260ca4d1 (diff)
A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.
I have tried to convert 'len' type variable declarations to unsigned as a means to address these warnings when appropriate, but when in doubt I have used casts in the comparisons instead. The better solution (that would get us all lynched by API users) would be to go through and convert all the function prototypes and structure definitions to use unsigned variables except when signed is necessary. The proliferation of (signed) "int" for strictly non-negative uses is unfortunate.
Diffstat (limited to 'crypto/hmac/hmac.c')
-rw-r--r--crypto/hmac/hmac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c
index 4c91f919d5..f7392a0dae 100644
--- a/crypto/hmac/hmac.c
+++ b/crypto/hmac/hmac.c
@@ -79,7 +79,7 @@ void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
{
reset=1;
j=EVP_MD_block_size(md);
- OPENSSL_assert(j <= sizeof ctx->key);
+ OPENSSL_assert(j <= (int)sizeof(ctx->key));
if (j < len)
{
EVP_DigestInit_ex(&ctx->md_ctx,md, impl);
@@ -89,7 +89,7 @@ void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
}
else
{
- OPENSSL_assert(len <= sizeof ctx->key);
+ OPENSSL_assert(len <= (int)sizeof(ctx->key));
memcpy(ctx->key,key,len);
ctx->key_length=len;
}