mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +00:00
Reverted pbuf_alloc() to REV 1.82
This commit is contained in:
parent
ea7bdb8e9e
commit
91afefa61a
@ -216,7 +216,7 @@ pbuf_alloc(pbuf_layer l, u16_t length, pbuf_flag flag)
|
||||
{
|
||||
struct pbuf *p, *q, *r;
|
||||
u16_t offset;
|
||||
u16_t rem_len; /* remaining length */
|
||||
s32_t rem_len; /* remaining length */
|
||||
LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 3, ("pbuf_alloc(length=%"U16_F")\n", length));
|
||||
|
||||
/* determine header offset */
|
||||
@ -270,7 +270,6 @@ pbuf_alloc(pbuf_layer l, u16_t length, pbuf_flag flag)
|
||||
/* remember first pbuf for linkage in next iteration */
|
||||
r = p;
|
||||
/* remaining length to be allocated */
|
||||
LWIP_ASSERT("length >= p->len", length >= p->len);
|
||||
rem_len = length - p->len;
|
||||
/* any remaining pbufs to be allocated? */
|
||||
while (rem_len > 0) {
|
||||
@ -297,10 +296,7 @@ pbuf_alloc(pbuf_layer l, u16_t length, pbuf_flag flag)
|
||||
((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0);
|
||||
q->ref = 1;
|
||||
/* calculate remaining length to be allocated */
|
||||
if(q->len < rem_len)
|
||||
rem_len -= q->len;
|
||||
else
|
||||
rem_len = 0;
|
||||
rem_len -= q->len;
|
||||
/* remember this pbuf for linkage in next iteration */
|
||||
r = q;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user