From ab1aa9d00734935b779c5d3af217583b4c36ca6a Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Thu, 27 Dec 2007 14:23:38 -0500 Subject: [PATCH] Make the letoh? macros consistent between little-endian and big-endian. --- src/byteorder.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/byteorder.h b/src/byteorder.h index ea6c759..4cf2854 100644 --- a/src/byteorder.h +++ b/src/byteorder.h @@ -29,8 +29,8 @@ static inline uint32_t _flip32(uint32_t val) # define letohs(x) _flip16(x) # define letohl(x) _flip32(x) #else -# define letohs(x) (x) -# define letohl(x) (x) +# define letohs(x) ((uint16_t)(x)) +# define letohl(x) ((uint16_t)(x)) #endif #endif -- 2.43.2