From 6e97c8592d65d67ce8f366e5504eb25254c32e63 Mon Sep 17 00:00:00 2001 From: tb Date: Sun, 8 May 2022 14:11:12 +0000 Subject: [PATCH] Adjust regress after zlib update. Part of the following commit: commit 0d36ec47f310478549c0864f215ab5c0114c49ba Author: Mark Adler Date: Wed Jan 2 18:10:40 2019 -0800 Don't bother computing check value after successful inflateSync(). --- regress/lib/libz/example.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/regress/lib/libz/example.c b/regress/lib/libz/example.c index b5943d8c5f6..eb36c8f9a51 100644 --- a/regress/lib/libz/example.c +++ b/regress/lib/libz/example.c @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: example.c,v 1.1.1.1 2022/03/24 19:41:06 bluhm Exp $ */ +/* @(#) $Id: example.c,v 1.2 2022/05/08 14:11:12 tb Exp $ */ #include "zlib.h" #include @@ -440,9 +440,8 @@ void test_sync(compr, comprLen, uncompr, uncomprLen) CHECK_ERR(err, "inflateSync"); err = inflate(&d_stream, Z_FINISH); - if (err != Z_DATA_ERROR) { - fprintf(stderr, "inflate should report DATA_ERROR\n"); - /* Because of incorrect adler32 */ + if (err != Z_STREAM_END) { + fprintf(stderr, "inflate should report Z_STREAM_END\n"); exit(1); } err = inflateEnd(&d_stream); -- 2.20.1