diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 60477383..af63e60d 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -1119,7 +1119,8 @@ pbuf_skip_const(const struct pbuf* in, u16_t in_offset, u16_t* out_offset) struct pbuf* pbuf_skip(struct pbuf* in, u16_t in_offset, u16_t* out_offset) { - return LWIP_CONST_CAST(struct pbuf*, pbuf_skip_const(in, in_offset, out_offset)); + const struct pbuf* out = pbuf_skip_const(in, in_offset, out_offset); + return LWIP_CONST_CAST(struct pbuf*, out); } /**