mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-12 12:45:35 +00:00
Stop compiler complaining of empty if statement when LWIP_DEBUGF() empty.
Close an unclosed comment.
This commit is contained in:
parent
42a6fa972d
commit
4680307a34
@ -740,7 +740,7 @@ pbuf_queue(struct pbuf *p, struct pbuf *n)
|
|||||||
p = p->next;
|
p = p->next;
|
||||||
/* { p->tot_len == p->len => p is last pbuf of a packet } */
|
/* { p->tot_len == p->len => p is last pbuf of a packet } */
|
||||||
}
|
}
|
||||||
/* { p is last pbuf of a packet }
|
/* { p is last pbuf of a packet } */
|
||||||
/* proceed to next packet on queue */
|
/* proceed to next packet on queue */
|
||||||
#endif
|
#endif
|
||||||
/* proceed to next pbuf */
|
/* proceed to next pbuf */
|
||||||
@ -843,7 +843,9 @@ pbuf_take(struct pbuf *p)
|
|||||||
/* PBUF_POOL buffers are faster if we can use them */
|
/* PBUF_POOL buffers are faster if we can use them */
|
||||||
if (p->len <= PBUF_POOL_BUFSIZE) {
|
if (p->len <= PBUF_POOL_BUFSIZE) {
|
||||||
q = pbuf_alloc(PBUF_RAW, p->len, PBUF_POOL);
|
q = pbuf_alloc(PBUF_RAW, p->len, PBUF_POOL);
|
||||||
if (q == NULL) LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 2, ("pbuf_take: Could not allocate PBUF_POOL\n"));
|
if (q == NULL) {
|
||||||
|
LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 2, ("pbuf_take: Could not allocate PBUF_POOL\n"));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* no replacement pbuf yet */
|
/* no replacement pbuf yet */
|
||||||
q = NULL;
|
q = NULL;
|
||||||
@ -852,7 +854,9 @@ pbuf_take(struct pbuf *p)
|
|||||||
/* no (large enough) PBUF_POOL was available? retry with PBUF_RAM */
|
/* no (large enough) PBUF_POOL was available? retry with PBUF_RAM */
|
||||||
if (q == NULL) {
|
if (q == NULL) {
|
||||||
q = pbuf_alloc(PBUF_RAW, p->len, PBUF_RAM);
|
q = pbuf_alloc(PBUF_RAW, p->len, PBUF_RAM);
|
||||||
if (q == NULL) LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 2, ("pbuf_take: Could not allocate PBUF_RAM\n"));
|
if (q == NULL) {
|
||||||
|
LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 2, ("pbuf_take: Could not allocate PBUF_RAM\n"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* replacement pbuf could be allocated? */
|
/* replacement pbuf could be allocated? */
|
||||||
if (q != NULL)
|
if (q != NULL)
|
||||||
@ -935,8 +939,10 @@ pbuf_dechain(struct pbuf *p)
|
|||||||
/* q is no longer referenced by p, free it */
|
/* q is no longer referenced by p, free it */
|
||||||
LWIP_DEBUGF(PBUF_DEBUG | DBG_STATE, ("pbuf_dechain: unreferencing %p\n", (void *)q));
|
LWIP_DEBUGF(PBUF_DEBUG | DBG_STATE, ("pbuf_dechain: unreferencing %p\n", (void *)q));
|
||||||
tail_gone = pbuf_free(q);
|
tail_gone = pbuf_free(q);
|
||||||
if (tail_gone > 0) LWIP_DEBUGF(PBUF_DEBUG | DBG_STATE,
|
if (tail_gone > 0) {
|
||||||
|
LWIP_DEBUGF(PBUF_DEBUG | DBG_STATE,
|
||||||
("pbuf_dechain: deallocated %p (as it is no longer referenced)\n", (void *)q));
|
("pbuf_dechain: deallocated %p (as it is no longer referenced)\n", (void *)q));
|
||||||
|
}
|
||||||
/* return remaining tail or NULL if deallocated */
|
/* return remaining tail or NULL if deallocated */
|
||||||
}
|
}
|
||||||
/* assert tot_len invariant: (p->tot_len == p->len + (p->next? p->next->tot_len: 0) */
|
/* assert tot_len invariant: (p->tot_len == p->len + (p->next? p->next->tot_len: 0) */
|
||||||
|
Loading…
Reference in New Issue
Block a user