Browse Source

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 <jk@ozlabs.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Jeremy Kerr 11 years ago
parent
commit
9eb1109954
1 changed files with 0 additions and 1 deletions
  1. 0 1
      ccan/endian/endian.h

+ 0 - 1
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);
 }