fix m_append for case where additional mbufs are required

This commit is contained in:
Sam Leffler 2004-12-15 19:04:07 +00:00
parent d5a96d8ceb
commit a37c415e66
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138894

View File

@ -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;
}