diff options
author | Bodo Möller <bodo@openssl.org> | 1999-05-10 11:10:38 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 1999-05-10 11:10:38 +0000 |
commit | 93c5624f04a4a371bdbd66af264743f0bad8c516 (patch) | |
tree | 8773ef6a20d28e3b8af991750335bb13b6d56425 /crypto/sha/sha_dgst.c | |
parent | 699dbecaf79410ab8b31533792e10686b396241e (diff) | |
download | openssl-93c5624f04a4a371bdbd66af264743f0bad8c516.tar.gz |
Moved some variable declarations inside blocks where they are needed
so that warnings about unused variables (for certain
-D... constellations) are avoided; this corresponds to the earlier
change for SHA1.
Submitted by:
Reviewed by:
PR:
Diffstat (limited to 'crypto/sha/sha_dgst.c')
-rw-r--r-- | crypto/sha/sha_dgst.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/crypto/sha/sha_dgst.c b/crypto/sha/sha_dgst.c index d90f497763..7504fb7c08 100644 --- a/crypto/sha/sha_dgst.c +++ b/crypto/sha/sha_dgst.c @@ -269,8 +269,6 @@ void SHA_Update(SHA_CTX *c, const register unsigned char *data, void SHA_Transform(SHA_CTX *c, unsigned char *b) { SHA_LONG p[SHA_LBLOCK]; - SHA_LONG *q; - int i; #if SHA_LONG_LOG2==2 #if defined(B_ENDIAN) || defined(SHA_ASM) @@ -280,6 +278,9 @@ void SHA_Transform(SHA_CTX *c, unsigned char *b) #else if (((unsigned long)b%sizeof(SHA_LONG)) == 0) { + SHA_LONG *q; + int i; + q=p; for (i=(SHA_LBLOCK/4); i; i--) { @@ -297,16 +298,21 @@ void SHA_Transform(SHA_CTX *c, unsigned char *b) #endif #endif #ifndef SHA_NO_TAIL_CODE /* defined above, see comment */ - q=p; - for (i=(SHA_LBLOCK/4); i; i--) { - SHA_LONG l; - c2nl(b,l); *(q++)=l; - c2nl(b,l); *(q++)=l; - c2nl(b,l); *(q++)=l; - c2nl(b,l); *(q++)=l; - } - sha_block(c,p,1); + SHA_LONG *q; + int i; + + q=p; + for (i=(SHA_LBLOCK/4); i; i--) + { + SHA_LONG l; + c2nl(b,l); *(q++)=l; + c2nl(b,l); *(q++)=l; + c2nl(b,l); *(q++)=l; + c2nl(b,l); *(q++)=l; + } + sha_block(c,p,1); + } #endif } |