diff options
author | dillon <dillon@FreeBSD.org> | 2002-02-05 02:00:56 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2002-02-05 02:00:56 +0000 |
commit | b3ddc72561f16866b59e6109d6803494f0d06caa (patch) | |
tree | ddce9732dedf55dfc29f00f3efed3b0ce5e9788e /sys/netgraph | |
parent | 0511c3ea5ba32c8d8794bbaecfb500020b2d7f0f (diff) | |
download | FreeBSD-src-b3ddc72561f16866b59e6109d6803494f0d06caa.zip FreeBSD-src-b3ddc72561f16866b59e6109d6803494f0d06caa.tar.gz |
Get rid of the twisted MFREE() macro entirely.
Reviewed by: dg, bmilekic
MFC after: 3 days
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/ng_async.c | 8 | ||||
-rw-r--r-- | sys/netgraph/ng_tty.c | 4 |
2 files changed, 3 insertions, 9 deletions
diff --git a/sys/netgraph/ng_async.c b/sys/netgraph/ng_async.c index f88fd70..08ac40e 100644 --- a/sys/netgraph/ng_async.c +++ b/sys/netgraph/ng_async.c @@ -472,15 +472,12 @@ nga_rcv_sync(const sc_p sc, item_p item) /* Add packet payload */ while (m != NULL) { - struct mbuf *n; - while (m->m_len > 0) { ADD_BYTE(*mtod(m, u_char *)); m->m_data++; m->m_len--; } - MFREE(m, n); - m = n; + m = m_free(m); } /* Add checksum and final sync flag */ @@ -597,8 +594,7 @@ reset: sc->fcs = PPP_FCS(sc->fcs, ch); } } - MFREE(m, n); - m = n; + m = m_free(m); } if (item) NG_FREE_ITEM(item); diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index 71eb758..6b0a388 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -422,7 +422,6 @@ ngt_start(struct tty *tp) /* Send as much of it as possible */ while (m) { - struct mbuf *m2; int sent; sent = m->m_len @@ -431,8 +430,7 @@ ngt_start(struct tty *tp) m->m_len -= sent; if (m->m_len > 0) break; /* device can't take no more */ - MFREE(m, m2); - m = m2; + m = m_free(m); } /* Put remainder of mbuf chain (if any) back on queue */ |