Add m_last() inline function.

This commit is contained in:
andre 2007-04-11 23:13:12 +00:00
parent 517c13e66c
commit f847d508c9

View File

@ -345,6 +345,7 @@ static __inline void m_clget(struct mbuf *m, int how);
static __inline void *m_cljget(struct mbuf *m, int how, int size);
static __inline void m_chtype(struct mbuf *m, short new_type);
void mb_free_ext(struct mbuf *);
static __inline struct mbuf *m_last(struct mbuf *m);
static __inline int
m_gettype(int size)
@ -579,6 +580,15 @@ m_chtype(struct mbuf *m, short new_type)
m->m_type = new_type;
}
static __inline struct mbuf *
m_last(struct mbuf *m)
{
while (m->m_next)
m = m->m_next;
return (m);
}
/*
* mbuf, cluster, and external object allocation macros (for compatibility
* purposes).