Commit c30f4ffc authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Tweak endianness of D_NTOHS.

parent ed909755
...@@ -30,11 +30,11 @@ THE SOFTWARE. ...@@ -30,11 +30,11 @@ THE SOFTWARE.
/* #elif defined __GNUC__*/ /* #elif defined __GNUC__*/
#else #else
#define DO_NTOHS(_d, _s) \ #define DO_NTOHS(_d, _s) \
do { short _dd; \ do { unsigned short _dd; \
memcpy(&(_dd), (_s), 2); \ memcpy(&(_dd), (_s), 2); \
_d = ntohs(_dd); } while(0) _d = ntohs(_dd); } while(0)
#define DO_NTOHL(_d, _s) \ #define DO_NTOHL(_d, _s) \
do { int _dd; \ do { unsigned int _dd; \
memcpy(&(_dd), (_s), 4); \ memcpy(&(_dd), (_s), 4); \
_d = ntohl(_dd); } while(0) _d = ntohl(_dd); } while(0)
#define DO_HTONS(_d, _s) \ #define DO_HTONS(_d, _s) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment