diff --git a/src/core/ipv4/inet_chksum.c b/src/core/ipv4/inet_chksum.c index a30a1834..dea8d5f2 100644 --- a/src/core/ipv4/inet_chksum.c +++ b/src/core/ipv4/inet_chksum.c @@ -66,7 +66,7 @@ /** Like the name says... */ #if LWIP_PLATFORM_BYTESWAP && (BYTE_ORDER == LITTLE_ENDIAN) /* 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 /* can't use htons on big endian (or PLATFORM_BYTESWAP not defined)... */ #define SWAP_BYTES_IN_WORD(w) ((w & 0xff) << 8) | ((w & 0xff00) >> 8)