summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d5f1bef)
raw | patch | inline | side by side (parent: d5f1bef)
author | Linus Torvalds <torvalds@g5.osdl.org> | |
Sun, 10 Jul 2005 22:43:54 +0000 (15:43 -0700) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Sun, 10 Jul 2005 22:43:54 +0000 (15:43 -0700) |
Very irritating. But "snprintf()" wants "char *", and zlib wants
"unsigned char *".
"unsigned char *".
sha1_file.c | patch | blob | history |
diff --git a/sha1_file.c b/sha1_file.c
index 15fd6e04360c2a963766d940b73775002abb0b77..6b9462cfba60764abf3956de45185e0e418ff82a 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
ssize_t size;
unsigned long objsize;
int posn = 0;
- char *buf = map_sha1_file_internal(sha1, &objsize);
+ void *buf = map_sha1_file_internal(sha1, &objsize);
z_stream stream;
if (!buf) {
unsigned char *unpacked;
stream.avail_out = size;
/* First header.. */
- stream.next_in = hdr;
+ stream.next_in = (void *)hdr;
stream.avail_in = hdrlen;
while (deflate(&stream, 0) == Z_OK)
/* nothing */;