diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-02-05 18:01:00 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-05 18:01:00 -0800 |
commit | 141b6b83d7ca5bd32d55a0a7e08384084d081557 (patch) | |
tree | 5c0aea567c793844ba1568c77b3eb3bea2e6fe81 /index-pack.c | |
parent | cc91e1bd0537442339c4fd233b98a4b30e9dbe29 (diff) | |
parent | 39c68542fc8d8477f2080c99efedb9dce975abc6 (diff) | |
download | git-141b6b83d7ca5bd32d55a0a7e08384084d081557.tar.gz git-141b6b83d7ca5bd32d55a0a7e08384084d081557.tar.xz |
Merge branch 'lt/maint-wrap-zlib' into maint
* 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.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/index-pack.c b/index-pack.c index 60ed41a99..c0a3d97a1 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); |