fixed bug #34541: LWIP_U32_DIFF is unnecessarily complex: removed that define

This commit is contained in:
Simon Goldschmidt
2011-10-13 19:29:48 +02:00
parent dc34636598
commit cf1be4ae2d
3 changed files with 4 additions and 5 deletions

View File

@@ -47,10 +47,6 @@ extern "C" {
#define NULL ((void *)0)
#endif
/** Get the absolute difference between 2 u32_t values (correcting overflows)
* 'a' is expected to be 'higher' (without overflow) than 'b'. */
#define LWIP_U32_DIFF(a, b) (((a) >= (b)) ? ((a) - (b)) : (((a) + ((b) ^ 0xFFFFFFFF) + 1)))
/* Endianess-optimized shifting of two u8_t to create one u16_t */
#if BYTE_ORDER == LITTLE_ENDIAN
#define LWIP_MAKE_U16(a, b) ((a << 8) | b)