bytesex.h: remove an unnecessary double expansion in WRITEADDR()

We can't really avoid the double expansion of (p), but the WRITE*()
macros all do that.  However, there is no reason to double-expand (s).

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin 2017-11-29 16:59:49 -08:00
parent 8cdde2bbaa
commit 7370483b00

View file

@ -262,8 +262,9 @@ static inline uint64_t cpu_to_le64(uint64_t v)
default: \
{ \
uint64_t _wa_v = cpu_to_le64(v); \
memcpy((p), &_wa_v, (s)); \
(p) += (s); \
size_t _wa_s = (s); \
memcpy((p), &_wa_v, _wa_s); \
(p) += _wa_s; \
} \
break; \
} \