Commit 9eb11099 authored by Jeremy Kerr's avatar Jeremy Kerr Committed by Rusty Russell

endian: Fix cpu_to_be64 on big-endian

Commit 9e2c88b5 added an extra return (with an unconditional byteswap)
in cpu_to_be64. This breaks on big-endian, where we shouldn't be
byteswapping.
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 495f0115
......@@ -279,7 +279,6 @@ static inline uint16_t le16_to_cpu(leint16_t le_val)
*/
static inline beint64_t cpu_to_be64(uint64_t native)
{
return ((ENDIAN_CAST beint64_t)BSWAP_64(native));
return CPU_TO_BE64(native);
}
......
Markdown is supported
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