Fixed compilation if LWIP_PLATFORM_BYTESWAP && (BYTE_ORDER == LITTLE_ENDIAN)

This commit is contained in:
goldsimon 2009-05-11 16:11:18 +00:00
parent 22d6558f13
commit c7ce2792c8

View File

@ -66,7 +66,7 @@
/** Like the name says... */ /** Like the name says... */
#if LWIP_PLATFORM_BYTESWAP && (BYTE_ORDER == LITTLE_ENDIAN) #if LWIP_PLATFORM_BYTESWAP && (BYTE_ORDER == LITTLE_ENDIAN)
/* little endian and PLATFORM_BYTESWAP defined */ /* little endian and PLATFORM_BYTESWAP defined */
#define SWAP_BYTES_IN_WORD(w) LWIP_PLATFORM_HTONS(x) #define SWAP_BYTES_IN_WORD(w) LWIP_PLATFORM_HTONS(w)
#else #else
/* can't use htons on big endian (or PLATFORM_BYTESWAP not defined)... */ /* can't use htons on big endian (or PLATFORM_BYTESWAP not defined)... */
#define SWAP_BYTES_IN_WORD(w) ((w & 0xff) << 8) | ((w & 0xff00) >> 8) #define SWAP_BYTES_IN_WORD(w) ((w & 0xff) << 8) | ((w & 0xff00) >> 8)