]> git.draconx.ca Git - liblbx.git/commitdiff
Make the letoh? macros consistent between little-endian and big-endian.
authorNick Bowler <draconx@gmail.com>
Thu, 27 Dec 2007 19:23:38 +0000 (14:23 -0500)
committerNick Bowler <draconx@gmail.com>
Thu, 27 Dec 2007 19:23:38 +0000 (14:23 -0500)
src/byteorder.h

index ea6c7594fe52877f45cd9cbe007be6ae015688bf..4cf2854424d68514d31981f11c29ca196befad02 100644 (file)
@@ -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