mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-11 14:10:34 +00:00
fix m_append for case where additional mbufs are required
This commit is contained in:
parent
d5a96d8ceb
commit
a37c415e66
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138894
@ -969,8 +969,8 @@ m_append(struct mbuf *m0, int len, c_caddr_t cp)
|
||||
if (n == NULL)
|
||||
break;
|
||||
n->m_len = min(MLEN, remainder);
|
||||
bcopy(cp, mtod(m, caddr_t), m->m_len);
|
||||
cp += m->m_len, remainder -= m->m_len;
|
||||
bcopy(cp, mtod(n, caddr_t), n->m_len);
|
||||
cp += n->m_len, remainder -= n->m_len;
|
||||
m->m_next = n;
|
||||
m = n;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user