diff --git a/include/re_mbuf.h b/include/re_mbuf.h index 8cc1991..c0dfec3 100644 --- a/include/re_mbuf.h +++ b/include/re_mbuf.h @@ -76,7 +76,7 @@ int mbuf_debug(struct re_printf *pf, const struct mbuf *mb); */ static inline uint8_t *mbuf_buf(const struct mbuf *mb) { - return mb ? mb->buf + mb->pos : NULL; + return mb ? mb->buf + mb->pos : (uint8_t *)NULL; }