X-Git-Url: https://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/4984faeea7e8ff655d950189f28b2787a571d7d9..ab1aa9d00734935b779c5d3af217583b4c36ca6a:/src/byteorder.h diff --git a/src/byteorder.h b/src/byteorder.h index 5eb4daf..4cf2854 100644 --- a/src/byteorder.h +++ b/src/byteorder.h @@ -1,12 +1,12 @@ #ifndef BYTEORDER_H_ #define BYTEORDER_H_ -#include - #ifdef HAVE_CONFIG_H # include "config.h" #endif +#include + static inline uint16_t _flip16(uint16_t val) { uint16_t hostval; @@ -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