mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 23:15:37 +00:00
fixed bug #34541: LWIP_U32_DIFF is unnecessarily complex: removed that define
This commit is contained in:
parent
aafa00f3aa
commit
bd0a664446
@ -49,6 +49,9 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2011-10-13: Simon Goldschmidt
|
||||||
|
* def.h, timers.c: fixed bug #34541: LWIP_U32_DIFF is unnecessarily complex
|
||||||
|
|
||||||
2011-10-13: Simon Goldschmidt
|
2011-10-13: Simon Goldschmidt
|
||||||
* sockets.c, api_lib.c: fixed bug #34540: compiler error when CORE_LOCKING is
|
* sockets.c, api_lib.c: fixed bug #34540: compiler error when CORE_LOCKING is
|
||||||
used and not all protocols are enabled
|
used and not all protocols are enabled
|
||||||
|
@ -367,7 +367,7 @@ sys_check_timeouts(void)
|
|||||||
|
|
||||||
now = sys_now();
|
now = sys_now();
|
||||||
/* this cares for wraparounds */
|
/* this cares for wraparounds */
|
||||||
diff = LWIP_U32_DIFF(now, timeouts_last_time);
|
diff = now - timeouts_last_time;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
#if PBUF_POOL_FREE_OOSEQ
|
#if PBUF_POOL_FREE_OOSEQ
|
||||||
|
@ -47,10 +47,6 @@ extern "C" {
|
|||||||
#define NULL ((void *)0)
|
#define NULL ((void *)0)
|
||||||
#endif
|
#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 */
|
/* Endianess-optimized shifting of two u8_t to create one u16_t */
|
||||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||||
#define LWIP_MAKE_U16(a, b) ((a << 8) | b)
|
#define LWIP_MAKE_U16(a, b) ((a << 8) | b)
|
||||||
|
Loading…
Reference in New Issue
Block a user