From: Nick Bowler Date: Thu, 27 Dec 2007 19:23:38 +0000 (-0500) Subject: Make the letoh? macros consistent between little-endian and big-endian. X-Git-Url: http://git.draconx.ca/gitweb/liblbx.git/commitdiff_plain/ab1aa9d00734935b779c5d3af217583b4c36ca6a Make the letoh? macros consistent between little-endian and big-endian. --- 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