diff options
Diffstat (limited to 'arch/s390/dfltcc_deflate.c')
-rw-r--r-- | arch/s390/dfltcc_deflate.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/s390/dfltcc_deflate.c b/arch/s390/dfltcc_deflate.c index e3b53ee..9ecc6ba 100644 --- a/arch/s390/dfltcc_deflate.c +++ b/arch/s390/dfltcc_deflate.c @@ -210,7 +210,10 @@ 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; + if (state->wrap == 1) + param->cv = strm->adler; + else if (state->wrap == 2) + param->cv = ZSWAP32(strm->adler); /* When opening a block, choose a Huffman-Table Type */ if (!param->bcf) { @@ -241,7 +244,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 == 1) + strm->adler = param->cv; + else if (state->wrap == 2) + strm->adler = ZSWAP32(param->cv); /* Unmask the input data */ strm->avail_in += masked_avail_in; |