summaryrefslogtreecommitdiffstats
path: root/Utilities/cmliblzma/liblzma/rangecoder/range_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmliblzma/liblzma/rangecoder/range_common.h')
-rw-r--r--Utilities/cmliblzma/liblzma/rangecoder/range_common.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Utilities/cmliblzma/liblzma/rangecoder/range_common.h b/Utilities/cmliblzma/liblzma/rangecoder/range_common.h
index 2c74dc1..f15623e 100644
--- a/Utilities/cmliblzma/liblzma/rangecoder/range_common.h
+++ b/Utilities/cmliblzma/liblzma/rangecoder/range_common.h
@@ -40,8 +40,11 @@
// This does the same for a complete bit tree.
// (A tree represented as an array.)
#define bittree_reset(probs, bit_levels) \
- for (uint32_t bt_i = 0; bt_i < (1 << (bit_levels)); ++bt_i) \
- bit_reset((probs)[bt_i])
+ do { \
+ uint32_t bt_i; \
+ for (bt_i = 0; bt_i < (1 << (bit_levels)); ++bt_i) \
+ bit_reset((probs)[bt_i]); \
+ } while (0)
//////////////////////