summaryrefslogtreecommitdiffstats
path: root/libfreerdp/codec/rfx_rlgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'libfreerdp/codec/rfx_rlgr.c')
-rw-r--r--libfreerdp/codec/rfx_rlgr.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/libfreerdp/codec/rfx_rlgr.c b/libfreerdp/codec/rfx_rlgr.c
index da1b63f..6ecbfbe 100644
--- a/libfreerdp/codec/rfx_rlgr.c
+++ b/libfreerdp/codec/rfx_rlgr.c
@@ -50,12 +50,12 @@
#define GetMinBits(_val, _nbits) \
do \
{ \
- UINT32 _v = _val; \
- _nbits = 0; \
+ UINT32 _v = (_val); \
+ (_nbits) = 0; \
while (_v) \
{ \
_v >>= 1; \
- _nbits++; \
+ (_nbits)++; \
} \
} while (0)
@@ -66,12 +66,12 @@
#define UpdateParam(_param, _deltaP, _k) \
do \
{ \
- _param += _deltaP; \
- if (_param > KPMAX) \
- _param = KPMAX; \
- if (_param < 0) \
- _param = 0; \
- _k = (_param >> LSGR); \
+ (_param) += (_deltaP); \
+ if ((_param) > KPMAX) \
+ (_param) = KPMAX; \
+ if ((_param) < 0) \
+ (_param) = 0; \
+ (_k) = ((_param) >> LSGR); \
} while (0)
static BOOL g_LZCNT = FALSE;
@@ -568,18 +568,18 @@ int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* WINPR_RESTRICT pSrcData, UINT32
}
/* Returns the next coefficient (a signed int) to encode, from the input stream */
-#define GetNextInput(_n) \
- do \
- { \
- if (data_size > 0) \
- { \
- _n = *data++; \
- data_size--; \
- } \
- else \
- { \
- _n = 0; \
- } \
+#define GetNextInput(_n) \
+ do \
+ { \
+ if (data_size > 0) \
+ { \
+ (_n) = *data++; \
+ data_size--; \
+ } \
+ else \
+ { \
+ (_n) = 0; \
+ } \
} while (0)
/* Emit bitPattern to the output bitstream */