From: Yann Collet Date: Mon, 3 Jul 2017 20:45:09 +0000 (-0700) Subject: gzip : only display inflateEnd error when there is no error before X-Git-Tag: v1.3.0~1^2~3^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9f21c8a711ce9ee7ce4acca15606174d32afed6;p=thirdparty%2Fzstd.git gzip : only display inflateEnd error when there is no error before --- diff --git a/programs/fileio.c b/programs/fileio.c index 94c629303..1d98e474a 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -1483,7 +1483,8 @@ static unsigned long long FIO_decompressGzFrame(dRess_t* ress, if (strm.avail_in > 0) memmove(ress->srcBuffer, strm.next_in, strm.avail_in); ress->srcBufferLoaded = strm.avail_in; - if (inflateEnd(&strm) != Z_OK) { + if ( (inflateEnd(&strm) != Z_OK) /* release resources ; error detected */ + && (decodingError==0) ) { DISPLAYLEVEL(1, "zstd: %s: inflateEnd error \n", srcFileName); decodingError = 1; }