mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 23:25:58 +00:00
Removed LWIP_DEBUG_ASSERT
This commit is contained in:
parent
0a4130a4ff
commit
98df3c6e0a
@ -191,7 +191,7 @@ pbuf_alloc(pbuf_layer l, u16_t length, pbuf_flag flag)
|
|||||||
/* make previous pbuf point to this pbuf */
|
/* make previous pbuf point to this pbuf */
|
||||||
r->next = q;
|
r->next = q;
|
||||||
/* set total length of this pbuf and next in chain */
|
/* set total length of this pbuf and next in chain */
|
||||||
LWIP_DEBUG_ASSERT("rem_len < max_u16_t",rem_len < 0xffff);
|
LWIP_ASSERT("rem_len < max_u16_t",rem_len < 0xffff);
|
||||||
q->tot_len = (u16_t)rem_len;
|
q->tot_len = (u16_t)rem_len;
|
||||||
/* this pbuf length is pool size, unless smaller sized tail */
|
/* this pbuf length is pool size, unless smaller sized tail */
|
||||||
q->len = rem_len > PBUF_POOL_BUFSIZE? PBUF_POOL_BUFSIZE: (u16_t)rem_len;
|
q->len = rem_len > PBUF_POOL_BUFSIZE? PBUF_POOL_BUFSIZE: (u16_t)rem_len;
|
||||||
@ -298,7 +298,7 @@ pbuf_realloc(struct pbuf *p, u16_t new_len)
|
|||||||
/* decrease remaining length by pbuf length */
|
/* decrease remaining length by pbuf length */
|
||||||
rem_len -= q->len;
|
rem_len -= q->len;
|
||||||
/* decrease total length indicator */
|
/* decrease total length indicator */
|
||||||
LWIP_DEBUG_ASSERT("grow < max_u16_t",grow < 0xffff);
|
LWIP_ASSERT("grow < max_u16_t",grow < 0xffff);
|
||||||
q->tot_len += (u16_t)grow;
|
q->tot_len += (u16_t)grow;
|
||||||
/* proceed to next pbuf in chain */
|
/* proceed to next pbuf in chain */
|
||||||
q = q->next;
|
q = q->next;
|
||||||
|
@ -63,14 +63,8 @@
|
|||||||
|
|
||||||
#ifndef LWIP_NOASSERT
|
#ifndef LWIP_NOASSERT
|
||||||
# define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)
|
# define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)
|
||||||
# ifdef LWIP_DEBUG
|
|
||||||
# define LWIP_DEBUG_ASSERT(x,y) LWIP_ASSERT(x,y)
|
|
||||||
# else
|
|
||||||
# define LWIP_DEBUG_ASSERT(x,y)
|
|
||||||
# endif
|
|
||||||
#else
|
#else
|
||||||
# define LWIP_ASSERT(x,y)
|
# define LWIP_ASSERT(x,y)
|
||||||
# define LWIP_DEBUG_ASSERT(x,y)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LWIP_DEBUG
|
#ifdef LWIP_DEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user