diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-02-08 18:52:26 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-02-08 18:52:26 +0000 |
commit | d0f0dfcdf0aaa906de6df3d70438ac6ab0a9688f (patch) | |
tree | f577b0ec677e2a76c09e1f022f74e8f4f0199363 /sys/arch/sparc/dev/qec.c | |
parent | 232fc04158ee6b11a53edba65f13b30dc302d0b9 (diff) |
simplify qec_put a bit
Diffstat (limited to 'sys/arch/sparc/dev/qec.c')
-rw-r--r-- | sys/arch/sparc/dev/qec.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/arch/sparc/dev/qec.c b/sys/arch/sparc/dev/qec.c index eeee47325c7..98c57ebc56a 100644 --- a/sys/arch/sparc/dev/qec.c +++ b/sys/arch/sparc/dev/qec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qec.c,v 1.13 2001/01/30 07:17:07 jason Exp $ */ +/* $OpenBSD: qec.c,v 1.14 2002/02/08 18:52:25 jason Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -310,25 +310,21 @@ qec_reset(sc) * network buffer memory. */ int -qec_put(buf, m) +qec_put(buf, m0) u_int8_t *buf; - struct mbuf *m; + struct mbuf *m0; { - struct mbuf *n; + struct mbuf *m; int len, tlen = 0; - for (; m != NULL; m = n) { + for (m = m0; m != NULL; m = m->m_next) { len = m->m_len; - if (len == 0) { - MFREE(m, n); - continue; - } bcopy(mtod(m, caddr_t), buf, len); buf += len; tlen += len; - MFREE(m, n); } - return tlen; + m_freem(m0); + return (tlen); } /* |