diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-21 16:55:17 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-21 16:55:17 -0800 |
commit | 36dd9393938d4e7f8843c6c587c9b4db077377fc (patch) | |
tree | 068987295f97b419452a69d3c15b82882a9e1582 /index-pack.c | |
parent | 664a3348b22bd5fe5d2d97b9985edeaf3a34cb71 (diff) | |
parent | 39c68542fc8d8477f2080c99efedb9dce975abc6 (diff) | |
download | git-36dd9393938d4e7f8843c6c587c9b4db077377fc.tar.gz |
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.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/index-pack.c b/index-pack.c index 2931511e8c..b46a6d6597 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); |