From 567ac2b268739a751df819d1aa68404f430151cb Mon Sep 17 00:00:00 2001 From: des Date: Tue, 8 Apr 2003 14:25:47 +0000 Subject: Introduce an M_ASSERTPKTHDR() macro which performs the very common task of asserting that an mbuf has a packet header. Use it instead of hand- rolled versions wherever applicable. Submitted by: Hiten Pandya --- sys/net/if_disc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys/net/if_disc.c') diff --git a/sys/net/if_disc.c b/sys/net/if_disc.c index 79775f1..cfc0432 100644 --- a/sys/net/if_disc.c +++ b/sys/net/if_disc.c @@ -155,8 +155,7 @@ static int discoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct rtentry *rt) { - if ((m->m_flags & M_PKTHDR) == 0) - panic("discoutput no HDR"); + M_ASSERTPKTHDR(m); /* BPF write needs to be handled specially */ if (dst->sa_family == AF_UNSPEC) { dst->sa_family = *(mtod(m, int *)); -- cgit v1.1