mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Add m_last() inline function.
This commit is contained in:
parent
15bad11fdb
commit
dfd389bf64
1 changed files with 10 additions and 0 deletions
|
|
@ -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).
|
||||
|
|
|
|||
Loading…
Reference in a new issue