From 631c458c55aae868a286446a9d42951ef5e1e126 Mon Sep 17 00:00:00 2001 From: sg Date: Mon, 23 May 2016 22:06:02 +0200 Subject: [PATCH] Fixed invalid DEBUGF level SERIOUS when pbuf_header fails (it returns '1': this is not serious!) --- src/core/pbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 300c0da1..1d64a7d5 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -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 */