Related to patch #9471: pbuf: Drop casting to u8_t for increment the reference count

Cast to correct type: Needed to avoid warnings about integer cast (-Wconversion)
SYS_ARCH_SET cannot be used here
This commit is contained in:
Dirk Ziegelmeier 2017-10-28 15:41:15 +02:00
parent 4a9e845a53
commit 08ec234127

View File

@ -821,7 +821,7 @@ pbuf_ref(struct pbuf *p)
{
/* pbuf given? */
if (p != NULL) {
SYS_ARCH_SET(p->ref, (u8_t)(p->ref + 1));
SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1));
LWIP_ASSERT("pbuf ref overflow", p->ref > 0);
}
}