]> git.draconx.ca Git - liblbx.git/blobdiff - src/byteorder.h
Make the letoh? macros consistent between little-endian and big-endian.
[liblbx.git] / 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