diff --git a/src/core/ipv6/ip6_frag.c b/src/core/ipv6/ip6_frag.c index e47cf9df..50d73473 100644 --- a/src/core/ipv6/ip6_frag.c +++ b/src/core/ipv6/ip6_frag.c @@ -559,12 +559,13 @@ ip6_reass(struct pbuf *p) #if IPV6_FRAG_COPYHEADER if (IPV6_FRAG_REQROOM > 0) { + u8_t hdrerr; /* Restore (only) the bytes that we overwrote beyond the fragment header. * Those bytes may belong to either the IPv6 header or an extension * header placed before the fragment header. */ MEMCPY(p->payload, ipr->orig_hdr, IPV6_FRAG_REQROOM); /* get back room for struct ip6_reass_helper (only required if sizeof(void*) > 4) */ - u8_t hdrerr = pbuf_header(p, -(s16_t)(IPV6_FRAG_REQROOM)); + hdrerr = pbuf_header(p, -(s16_t)(IPV6_FRAG_REQROOM)); LWIP_UNUSED_ARG(hdrerr); /* in case of LWIP_NOASSERT */ LWIP_ASSERT("no room for struct ip6_reass_helper", hdrerr == 0); }