Fixed another assert. Removed another redundant assignment.

This commit is contained in:
likewise 2003-04-01 12:28:45 +00:00
parent b04ac8f3be
commit a28af1be11

View File

@ -597,12 +597,10 @@ pbuf_free(struct pbuf *p)
PERF_START; PERF_START;
LWIP_ASSERT("pbuf_free: sane flags", p->flags == PBUF_FLAG_POOL || LWIP_ASSERT("pbuf_free: sane flags",
p->flags == PBUF_FLAG_ROM || p->flags == PBUF_FLAG_RAM || p->flags == PBUF_FLAG_ROM ||
p->flags == PBUF_FLAG_RAM || p->flags == PBUF_FLAG_REF || p->flags == PBUF_FLAG_POOL);
p->flags == PBUF_FLAG_REF );
q = p;
count = 0; count = 0;
/* Since decrementing ref cannot be guaranteed to be a single machine operation /* Since decrementing ref cannot be guaranteed to be a single machine operation
* we must protect it. Also, the later test of ref must be protected. * we must protect it. Also, the later test of ref must be protected.
@ -612,7 +610,7 @@ pbuf_free(struct pbuf *p)
* obtain a zero reference count */ * obtain a zero reference count */
while (p != NULL) { while (p != NULL) {
/* all pbufs in a chain are referenced at least once */ /* all pbufs in a chain are referenced at least once */
LWIP_ASSERT("pbuf_free: q->ref > 0", q->ref > 0); LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);
p->ref--; p->ref--;
/* this pbuf is no longer referenced to? */ /* this pbuf is no longer referenced to? */
if (p->ref == 0) if (p->ref == 0)