Fix constness of input in mozilla-sha1/sha1.c::SHA1_Update().
Among the three of our own implementations, only this one lacked "const" from the second argument. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Nov 1, 2005 at 10:56 UTC
77ab8798d3f8df39877235be17bb6e70077aaba2
2 files changed
+3
-3
mozilla-sha1/sha1.c
+2
-2
@@ -56,8 +56,8 @@ void SHA1_Init(SHA_CTX *ctx) {
56
}
57
58
59
-void SHA1_Update(SHA_CTX *ctx, void *_dataIn, int len) {
60
- unsigned char *dataIn = _dataIn;
59
+void SHA1_Update(SHA_CTX *ctx, const void *_dataIn, int len) {
60
+ const unsigned char *dataIn = _dataIn;
61
int i;
62
63
/* Read the data into W and process blocks as they get full
mozilla-sha1/sha1.h
+1
-1
@@ -41,5 +41,5 @@ typedef struct {
41
} SHA_CTX;
42
43
void SHA1_Init(SHA_CTX *ctx);
44
-void SHA1_Update(SHA_CTX *ctx, void *dataIn, int len);
44
+void SHA1_Update(SHA_CTX *ctx, const void *dataIn, int len);
45
void SHA1_Final(unsigned char hashout[20], SHA_CTX *ctx);