Commit 20ce4345 authored by Clément Vasseur's avatar Clément Vasseur
Browse files

dvb/sim.h: simplify TLV_DECLARE_PARAM

Fix int-in-bool-context warning from g++:
./dvb/sim.h:206:40: error: ‘<<’ in boolean context, did you mean ‘<’ ?
parent 622c3bb3
...@@ -203,9 +203,9 @@ static inline bool intf##_append_##name(uint8_t *p_tlv, type i_##name) \ ...@@ -203,9 +203,9 @@ static inline bool intf##_append_##name(uint8_t *p_tlv, type i_##name) \
static inline type intf##_find_##name(uint8_t *p_tlv, uint16_t n) \ static inline type intf##_find_##name(uint8_t *p_tlv, uint16_t n) \
{ \ { \
const uint8_t *p_tlv_n = tlv_find_param(p_tlv, param, n); \ const uint8_t *p_tlv_n = tlv_find_param(p_tlv, param, n); \
type i_##name = (type)(p_tlv_n[4]) << 8 * (sizeof(type) - 1); \ type i_##name = 0; \
int i; \ int i; \
for (i = 1; i < sizeof(type); i++) \ for (i = 0; i < sizeof(type); i++) \
i_##name |= (utype)(p_tlv_n[4 + i]) << 8 * (sizeof(type) - i - 1); \ i_##name |= (utype)(p_tlv_n[4 + i]) << 8 * (sizeof(type) - i - 1); \
return i_##name; \ return i_##name; \
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment