From: Ilya Leoshkevich Date: Mon, 11 Oct 2021 11:22:13 +0000 (+0200) Subject: IBM Z: Sync crc_fold with DFLTCC X-Git-Tag: 2.1.0-beta1~502 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33aacca93b6aeabe44325ece1a315710329e37e6;p=thirdparty%2Fzlib-ng.git IBM Z: Sync crc_fold with DFLTCC Intermediate CRC32 value was moved from strm->adler to state->crc_fold. --- diff --git a/arch/s390/dfltcc_deflate.c b/arch/s390/dfltcc_deflate.c index e3b53ee13..0a65aa7e8 100644 --- a/arch/s390/dfltcc_deflate.c +++ b/arch/s390/dfltcc_deflate.c @@ -210,7 +210,7 @@ again: *strm->next_out = (unsigned char)state->bi_buf; /* Honor history and check value */ param->nt = 0; - param->cv = state->wrap == 2 ? ZSWAP32(strm->adler) : strm->adler; + param->cv = state->wrap == 2 ? ZSWAP32(state->crc_fold.value) : strm->adler; /* When opening a block, choose a Huffman-Table Type */ if (!param->bcf) { @@ -241,7 +241,10 @@ again: state->bi_buf = 0; /* Avoid accessing next_out */ else state->bi_buf = *strm->next_out & ((1 << state->bi_valid) - 1); - strm->adler = state->wrap == 2 ? ZSWAP32(param->cv) : param->cv; + if (state->wrap == 2) + state->crc_fold.value = ZSWAP32(param->cv); + else + strm->adler = param->cv; /* Unmask the input data */ strm->avail_in += masked_avail_in;