diff options
author | julian <julian@FreeBSD.org> | 2002-09-19 08:28:41 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-09-19 08:28:41 +0000 |
commit | c431e46788ee8d257c6ea3b91a72c20a4f95c3a2 (patch) | |
tree | cfd09f3adf9a90d881d370979c2880126d5fc407 | |
parent | 3935e48680c808fe65f3a9d6149df4ef37cdb40e (diff) | |
download | FreeBSD-src-c431e46788ee8d257c6ea3b91a72c20a4f95c3a2.zip FreeBSD-src-c431e46788ee8d257c6ea3b91a72c20a4f95c3a2.tar.gz |
While well intentionned the check to see it there is a packet
header and return that length, was misguided.
The check itself didn't take into account the fact that the
mbuf pointer pased in may be null, and the function is
defined specifically for cases where the caller knows what it wants.
Rather than fix the check I'm removing it as phk suggested.
Submitted by: phk@freebsd.org
-rw-r--r-- | sys/kern/uipc_mbuf.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 847b4ee..cad6d3e 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -727,9 +727,6 @@ m_length(struct mbuf *m0, struct mbuf **last) struct mbuf *m; u_int len; - if ((m0->m_flags & M_PKTHDR) != 0) - return (m0->m_pkthdr.len); - len = 0; for (m = m0; m != NULL; m = m->m_next) { len += m->m_len; |