freebsd11_network: Fixup last commit for C++ compatibility.

This commit is contained in:
Augustin Cavalier 2018-10-04 20:06:15 -04:00
parent bb40dfec8f
commit 8dea3e53a9
2 changed files with 10 additions and 10 deletions

View File

@ -645,7 +645,7 @@ drbr_enqueue(struct ifnet *ifp, struct buf_ring *br, struct mbuf *m)
}
static __inline void
drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *new)
drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *_new)
{
/*
* The top of the list needs to be swapped
@ -657,11 +657,11 @@ drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *new)
* Peek in altq case dequeued it
* so put it back.
*/
IFQ_DRV_PREPEND(&ifp->if_snd, new);
IFQ_DRV_PREPEND(&ifp->if_snd, _new);
return;
}
#endif
buf_ring_putback_sc(br, new);
buf_ring_putback_sc(br, _new);
}
static __inline struct mbuf *
@ -680,7 +680,7 @@ drbr_peek(struct ifnet *ifp, struct buf_ring *br)
return (m);
}
#endif
return(buf_ring_peek_clear_sc(br));
return (struct mbuf*)buf_ring_peek_clear_sc(br);
}
static __inline void
@ -692,7 +692,7 @@ drbr_flush(struct ifnet *ifp, struct buf_ring *br)
if (ifp != NULL && ALTQ_IS_ENABLED(&ifp->if_snd))
IFQ_PURGE(&ifp->if_snd);
#endif
while ((m = buf_ring_dequeue_sc(br)) != NULL)
while ((m = (struct mbuf*)buf_ring_dequeue_sc(br)) != NULL)
m_freem(m);
}
@ -715,7 +715,7 @@ drbr_dequeue(struct ifnet *ifp, struct buf_ring *br)
return (m);
}
#endif
return (buf_ring_dequeue_sc(br));
return (struct mbuf*)buf_ring_dequeue_sc(br);
}
static __inline void
@ -748,11 +748,11 @@ drbr_dequeue_cond(struct ifnet *ifp, struct buf_ring *br,
return (m);
}
#endif
m = buf_ring_peek(br);
m = (struct mbuf*)buf_ring_peek(br);
if (m == NULL || func(m, arg) == 0)
return (NULL);
return (buf_ring_dequeue_sc(br));
return (struct mbuf*)buf_ring_dequeue_sc(br);
}
static __inline int

View File

@ -267,11 +267,11 @@ buf_ring_advance_sc(struct buf_ring *br)
* the compare and an atomic.
*/
static __inline void
buf_ring_putback_sc(struct buf_ring *br, void *new)
buf_ring_putback_sc(struct buf_ring *br, void *_new)
{
KASSERT(br->br_cons_head != br->br_prod_tail,
("Buf-Ring has none in putback")) ;
br->br_ring[br->br_cons_head] = new;
br->br_ring[br->br_cons_head] = _new;
}
/*