mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-21 15:46:52 +08:00
Added assertions where PBUF_RAM pbufs are used and an assumption is made that this pbuf is in one piece (i.e. not chained). These assumptions clash with the possibility of converting to fully pool-based pbuf implementations, where PBUF_RAM pbufs might be chained.
This commit is contained in:
@@ -108,6 +108,8 @@ netbuf_alloc(struct netbuf *buf, u16_t size)
|
||||
if (buf->p == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
LWIP_ASSERT("check that first pbuf can hold size",
|
||||
(buf->p->len >= size));
|
||||
buf->ptr = buf->p;
|
||||
return buf->p->payload;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user