diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-07-16 13:47:26 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-07-16 13:47:26 +0300 |
commit | 0f6d96a4f5a904fd95b96e13715b50befa6a0ee9 (patch) | |
tree | e43022707015019f093c14fd1afd2440d6d75ead /src/gunzip.c | |
parent | 6715a0ba12af54767ba889de07afe3543b7c1543 (diff) | |
download | apk-tools-0f6d96a4f5a904fd95b96e13715b50befa6a0ee9.tar.gz apk-tools-0f6d96a4f5a904fd95b96e13715b50befa6a0ee9.tar.bz2 apk-tools-0f6d96a4f5a904fd95b96e13715b50befa6a0ee9.tar.xz apk-tools-0f6d96a4f5a904fd95b96e13715b50befa6a0ee9.zip |
gzip: always autoclose the inner stream
Diffstat (limited to 'src/gunzip.c')
-rw-r--r-- | src/gunzip.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gunzip.c b/src/gunzip.c index 010d45e..af906d1 100644 --- a/src/gunzip.c +++ b/src/gunzip.c @@ -22,7 +22,6 @@ struct apk_gzip_istream { struct apk_bstream *bs; z_stream zs; int z_err; - int autoclose; EVP_MD_CTX mdctx; void *mdblock; @@ -104,12 +103,11 @@ static void gz_close(void *stream) if (gis->cb != NULL) EVP_MD_CTX_cleanup(&gis->mdctx); inflateEnd(&gis->zs); - if (gis->autoclose) - gis->bs->close(gis->bs, NULL); + gis->bs->close(gis->bs, NULL); free(gis); } -struct apk_istream *apk_bstream_gunzip_mpart(struct apk_bstream *bs, int autoclose, +struct apk_istream *apk_bstream_gunzip_mpart(struct apk_bstream *bs, apk_multipart_cb cb, void *ctx) { struct apk_gzip_istream *gis; @@ -126,7 +124,6 @@ struct apk_istream *apk_bstream_gunzip_mpart(struct apk_bstream *bs, int autoclo .is.close = gz_close, .bs = bs, .z_err = 0, - .autoclose = autoclose, .cb = cb, .cbctx = ctx, }; |