From 9eb1109954a99791ae6a930a4b7120b1c55ee1a7 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Mon, 18 Aug 2014 18:45:39 +0800 Subject: [PATCH] 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: Jeremy Kerr Signed-off-by: Rusty Russell --- ccan/endian/endian.h | 1 - 1 file changed, 1 deletion(-) diff --git a/ccan/endian/endian.h b/ccan/endian/endian.h index dc9f62e6..0c99cc80 100644 --- a/ccan/endian/endian.h +++ b/ccan/endian/endian.h @@ -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); } -- 2.39.2