X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=zlib.c;h=2b2c0c780e3fca6217c688298053a01aad724505;hb=ed6ce4382b5cb34e98ca3db2f19de82a037da322;hp=3c63d480c75e9939fb3a047f595b032e9509d681;hpb=f1f509cc4504ebe9e2922c7bc61794183e3d441a;p=git.git diff --git a/zlib.c b/zlib.c index 3c63d480c..2b2c0c780 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),