summaryrefslogtreecommitdiff
path: root/zlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zlib.c')
-rw-r--r--zlib.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/zlib.c b/zlib.c
index 3c63d480c7..2b2c0c780e 100644
--- a/zlib.c
+++ b/zlib.c
@@ -188,13 +188,20 @@ void git_deflate_init_gzip(git_zstream *strm, int level)
strm->z.msg ? strm->z.msg : "no message");
}
-void git_deflate_end(git_zstream *strm)
+int git_deflate_abort(git_zstream *strm)
{
int status;
zlib_pre_call(strm);
status = deflateEnd(&strm->z);
zlib_post_call(strm);
+ return status;
+}
+
+void git_deflate_end(git_zstream *strm)
+{
+ int status = git_deflate_abort(strm);
+
if (status == Z_OK)
return;
error("deflateEnd: %s (%s)", zerr_to_string(status),