aboutsummaryrefslogtreecommitdiff
path: root/index-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-21 16:55:17 -0800
committerJunio C Hamano <gitster@pobox.com>2009-01-21 16:55:17 -0800
commit36dd9393938d4e7f8843c6c587c9b4db077377fc (patch)
tree068987295f97b419452a69d3c15b82882a9e1582 /index-pack.c
parent664a3348b22bd5fe5d2d97b9985edeaf3a34cb71 (diff)
parent39c68542fc8d8477f2080c99efedb9dce975abc6 (diff)
downloadgit-36dd9393938d4e7f8843c6c587c9b4db077377fc.tar.gz
git-36dd9393938d4e7f8843c6c587c9b4db077377fc.tar.xz
Merge branch 'lt/maint-wrap-zlib'
* lt/maint-wrap-zlib: Wrap inflate and other zlib routines for better error reporting Conflicts: http-push.c http-walker.c sha1_file.c
Diffstat (limited to 'index-pack.c')
-rw-r--r--index-pack.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/index-pack.c b/index-pack.c
index 2931511e8..b46a6d659 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -275,10 +275,10 @@ static void *unpack_entry_data(unsigned long offset, unsigned long size)
stream.avail_out = size;
stream.next_in = fill(1);
stream.avail_in = input_len;
- inflateInit(&stream);
+ git_inflate_init(&stream);
for (;;) {
- int ret = inflate(&stream, 0);
+ int ret = git_inflate(&stream, 0);
use(input_len - stream.avail_in);
if (stream.total_out == size && ret == Z_STREAM_END)
break;
@@ -287,7 +287,7 @@ static void *unpack_entry_data(unsigned long offset, unsigned long size)
stream.next_in = fill(1);
stream.avail_in = input_len;
}
- inflateEnd(&stream);
+ git_inflate_end(&stream);
return buf;
}
@@ -382,9 +382,9 @@ static void *get_data_from_pack(struct object_entry *obj)
stream.avail_out = obj->size;
stream.next_in = src;
stream.avail_in = len;
- inflateInit(&stream);
- while ((st = inflate(&stream, Z_FINISH)) == Z_OK);
- inflateEnd(&stream);
+ git_inflate_init(&stream);
+ while ((st = git_inflate(&stream, Z_FINISH)) == Z_OK);
+ git_inflate_end(&stream);
if (st != Z_STREAM_END || stream.total_out != obj->size)
die("serious inflate inconsistency");
free(src);