From 4a3276d4a47c86d14668f391a3477d9696092eaa Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Thu, 19 Sep 2002 08:28:41 +0000 Subject: 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 --- sys/kern/uipc_mbuf.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'sys/kern') diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 847b4ee3e5e7..cad6d3e36374 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; -- cgit v1.3