Fixed invalid DEBUGF level SERIOUS when pbuf_header fails (it returns '1': this is not serious!)

This commit is contained in:
sg 2016-05-23 22:06:02 +02:00
parent 6c8c3fd48c
commit 631c458c55

View File

@ -543,9 +543,9 @@ pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force)
p->payload = (u8_t *)p->payload - header_size_increment;
/* boundary check fails? */
if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) {
LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS,
LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE,
("pbuf_header: failed as %p < %p (not enough space for new header size)\n",
(void *)p->payload, (void *)(p + 1)));
(void *)p->payload, (void *)((u8_t *)p + SIZEOF_STRUCT_PBUF)));
/* restore old payload pointer */
p->payload = payload;
/* bail out unsuccessfully */