From: Nathan Moinvaziri Date: Thu, 30 Dec 2021 04:48:47 +0000 (-0800) Subject: Check for err == Z_OK is always true in minideflate loops. X-Git-Tag: 2.1.0-beta1~461 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe2211ba4cf7bc253353f8c3082c7a179d2624e2;p=thirdparty%2Fzlib-ng.git Check for err == Z_OK is always true in minideflate loops. --- diff --git a/test/minideflate.c b/test/minideflate.c index 36c27f904..f82cfcc30 100644 --- a/test/minideflate.c +++ b/test/minideflate.c @@ -111,7 +111,7 @@ void deflate_params(FILE *fin, FILE *fout, int32_t read_buf_size, int32_t write_ err = PREFIX(deflate)(&c_stream, Z_FINISH); if (err == Z_STREAM_END) break; CHECK_ERR(err, "deflate"); - } while (err == Z_OK); + } while (1); } /* Output remaining data in write buffer */ @@ -197,7 +197,7 @@ void inflate_params(FILE *fin, FILE *fout, int32_t read_buf_size, int32_t write_ err = PREFIX(inflate)(&d_stream, Z_FINISH); if (err == Z_STREAM_END) break; CHECK_ERR(err, "inflate"); - } while (err == Z_OK); + } while (1); } /* Output remaining data in write buffer */