diff options
| author | thorpej <thorpej@NetBSD.org> | 2022-09-17 16:54:01 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2022-09-17 16:54:01 +0000 |
| commit | dfe426a4282fac69c94915ee2f00e09645342790 (patch) | |
| tree | 353c0b0c90bcef2d60dfaece2fb4ebbc318538db /sys/dev | |
| parent | a99bbfcfef00a3cf8590ff7b796f95e6310e2a37 (diff) | |
Convert an open-coded check for M_PKTHDR + panic into a KASSERT().
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/isa/if_eg.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c index 0b47685915a..36e4a527d89 100644 --- a/sys/dev/isa/if_eg.c +++ b/sys/dev/isa/if_eg.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_eg.c,v 1.101 2022/09/17 16:52:26 thorpej Exp $ */ +/* $NetBSD: if_eg.c,v 1.102 2022/09/17 16:54:01 thorpej Exp $ */ /* * Copyright (c) 1993 Dean Huxley <dean@fsa.ca> @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.101 2022/09/17 16:52:26 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.102 2022/09/17 16:54:01 thorpej Exp $"); #include "opt_inet.h" @@ -575,10 +575,7 @@ loop: sc->eg_txbusy = true; /* We need to use m->m_pkthdr.len, so require the header */ - if ((m0->m_flags & M_PKTHDR) == 0) { - aprint_error_dev(sc->sc_dev, "no header mbuf\n"); - panic("egstart"); - } + KASSERT(m0->m_flags & M_PKTHDR); len = uimax(m0->m_pkthdr.len, ETHER_MIN_LEN - ETHER_CRC_LEN); bpf_mtap(ifp, m0, BPF_D_OUT); |
