diff options
Diffstat (limited to 'Utilities/cmliblzma/liblzma/lzma/lzma_common.h')
-rw-r--r-- | Utilities/cmliblzma/liblzma/lzma/lzma_common.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Utilities/cmliblzma/liblzma/lzma/lzma_common.h b/Utilities/cmliblzma/liblzma/lzma/lzma_common.h index e31e285..36267dc 100644 --- a/Utilities/cmliblzma/liblzma/lzma/lzma_common.h +++ b/Utilities/cmliblzma/liblzma/lzma/lzma_common.h @@ -129,12 +129,15 @@ static inline void literal_init(probability (*probs)[LITERAL_CODER_SIZE], uint32_t lc, uint32_t lp) { + uint32_t coders; + uint32_t i, j; + assert(lc + lp <= LZMA_LCLP_MAX); - const uint32_t coders = 1U << (lc + lp); + coders = 1U << (lc + lp); - for (uint32_t i = 0; i < coders; ++i) - for (uint32_t j = 0; j < LITERAL_CODER_SIZE; ++j) + for (i = 0; i < coders; ++i) + for (j = 0; j < LITERAL_CODER_SIZE; ++j) bit_reset(probs[i][j]); return; |