aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/index-pack.c6
-rw-r--r--builtin/pack-objects.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 31f001f10..dbfb5da52 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -671,21 +671,21 @@ static int write_compressed(struct sha1file *f, void *in, unsigned int size)
unsigned char outbuf[4096];
memset(&stream, 0, sizeof(stream));
- deflateInit(&stream, zlib_compression_level);
+ git_deflate_init(&stream, zlib_compression_level);
stream.next_in = in;
stream.avail_in = size;
do {
stream.next_out = outbuf;
stream.avail_out = sizeof(outbuf);
- status = deflate(&stream, Z_FINISH);
+ status = git_deflate(&stream, Z_FINISH);
sha1write(f, outbuf, sizeof(outbuf) - stream.avail_out);
} while (status == Z_OK);
if (status != Z_STREAM_END)
die("unable to deflate appended object (%d)", status);
size = stream.total_out;
- deflateEnd(&stream);
+ git_deflate_end(&stream);
return size;
}
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index f402a843b..61f975585 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -131,7 +131,7 @@ static unsigned long do_compress(void **pptr, unsigned long size)
unsigned long maxsize;
memset(&stream, 0, sizeof(stream));
- deflateInit(&stream, pack_compression_level);
+ git_deflate_init(&stream, pack_compression_level);
maxsize = deflateBound(&stream, size);
in = *pptr;
@@ -142,9 +142,9 @@ static unsigned long do_compress(void **pptr, unsigned long size)
stream.avail_in = size;
stream.next_out = out;
stream.avail_out = maxsize;
- while (deflate(&stream, Z_FINISH) == Z_OK)
+ while (git_deflate(&stream, Z_FINISH) == Z_OK)
; /* nothing */
- deflateEnd(&stream);
+ git_deflate_end(&stream);
free(in);
return stream.total_out;