summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-25 19:04:55 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-25 19:04:55 (GMT)
commitf5b913c9cb52cee019585375546817cfe5c75426 (patch)
treeac76484a10f69423169e72f4bf9461b3e3ad880f /sha1_file.c
parenta44c9a5e2e6d4108452f2c64dbd11f74a83745af (diff)
downloadgit-f5b913c9cb52cee019585375546817cfe5c75426.zip
git-f5b913c9cb52cee019585375546817cfe5c75426.tar.gz
git-f5b913c9cb52cee019585375546817cfe5c75426.tar.bz2
Fix up the types in write_sha1_file
Use "unsigned long" for the size, like we do everywhere else.
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c
index d2f38f0..d98b265 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -231,7 +231,7 @@ void *read_tree_with_tree_or_commit_sha1(const unsigned char *sha1,
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);