summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a44c9a5)
raw | patch | inline | side by side (parent: a44c9a5)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 25 Apr 2005 19:04:55 +0000 (12:04 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 25 Apr 2005 19:04:55 +0000 (12:04 -0700) |
Use "unsigned long" for the size, like we do everywhere else.
cache.h | patch | blob | history | |
sha1_file.c | patch | blob | history |
index 226788a5bbe812ae00335560bce20d57899119b6..4ef80c392adb19df21a779edab366f99b7850e54 100644 (file)
--- a/cache.h
+++ b/cache.h
extern void * map_sha1_file(const unsigned char *sha1, unsigned long *size);
extern void * unpack_sha1_file(void *map, unsigned long mapsize, char *type, unsigned long *size);
extern void * read_sha1_file(const unsigned char *sha1, char *type, unsigned long *size);
-extern int write_sha1_file(char *buf, unsigned len, const char *type, unsigned char *return_sha1);
+extern int write_sha1_file(char *buf, unsigned long len, const char *type, unsigned char *return_sha1);
extern int check_sha1_signature(unsigned char *sha1, void *buf, unsigned long size, const char *type);
diff --git a/sha1_file.c b/sha1_file.c
index d2f38f0cdc78d81ffb5a601eb603a81775586368..d98b265bbbb6dbf222877a41bcde43eb3b5a9158 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
return buffer;
}
-int write_sha1_file(char *buf, unsigned len, const char *type, unsigned char *returnsha1)
+int write_sha1_file(char *buf, unsigned long len, const char *type, unsigned char *returnsha1)
{
int size;
char *compressed;
@@ -243,7 +243,7 @@ int write_sha1_file(char *buf, unsigned len, const char *type, unsigned char *re
int fd, hdrlen;
/* Generate the header */
- hdrlen = sprintf(hdr, "%s %d", type, len)+1;
+ hdrlen = sprintf(hdr, "%s %lu", type, len)+1;
/* Sha1.. */
SHA1_Init(&c);