summaryrefslogtreecommitdiffstats
path: root/Utilities/cmliblzma/liblzma/lzma/lzma_common.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-08-06 13:56:41 (GMT)
committerBrad King <brad.king@kitware.com>2018-08-06 14:22:56 (GMT)
commit6166adfdd40954767f3c4e40da502285ed16a9b1 (patch)
treede3266371a950f40937f4f5a248c44244215755d /Utilities/cmliblzma/liblzma/lzma/lzma_common.h
parent0a3912112d11514ba1652423e21a767507ce75fb (diff)
downloadCMake-6166adfdd40954767f3c4e40da502285ed16a9b1.zip
CMake-6166adfdd40954767f3c4e40da502285ed16a9b1.tar.gz
CMake-6166adfdd40954767f3c4e40da502285ed16a9b1.tar.bz2
liblzma: Revert "Port from C99 to C89/90"
Revert commit v3.1.0-rc1~255^2~5 (liblzma: Port from C99 to C89/90, 2014-07-13). We now compile as C99 or above except on MSVC where we will use another approach.
Diffstat (limited to 'Utilities/cmliblzma/liblzma/lzma/lzma_common.h')
-rw-r--r--Utilities/cmliblzma/liblzma/lzma/lzma_common.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/Utilities/cmliblzma/liblzma/lzma/lzma_common.h b/Utilities/cmliblzma/liblzma/lzma/lzma_common.h
index 36267dc..e31e285 100644
--- a/Utilities/cmliblzma/liblzma/lzma/lzma_common.h
+++ b/Utilities/cmliblzma/liblzma/lzma/lzma_common.h
@@ -129,15 +129,12 @@ 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);
- coders = 1U << (lc + lp);
+ const uint32_t coders = 1U << (lc + lp);
- for (i = 0; i < coders; ++i)
- for (j = 0; j < LITERAL_CODER_SIZE; ++j)
+ for (uint32_t i = 0; i < coders; ++i)
+ for (uint32_t j = 0; j < LITERAL_CODER_SIZE; ++j)
bit_reset(probs[i][j]);
return;