It is unnecessary to cast from void * to struct rte_mbuf *,
the change can make code clearer.
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
static inline struct rte_mbuf *rte_mbuf_raw_alloc(struct rte_mempool *mp)
{
struct rte_mbuf *m;
static inline struct rte_mbuf *rte_mbuf_raw_alloc(struct rte_mempool *mp)
{
struct rte_mbuf *m;
- if (rte_mempool_get(mp, &mb) < 0)
+ if (rte_mempool_get(mp, (void **)&m) < 0)
- m = (struct rte_mbuf *)mb;
MBUF_RAW_ALLOC_CHECK(m);
return m;
}
MBUF_RAW_ALLOC_CHECK(m);
return m;
}