Module Name: src Committed By: thorpej Date: Sat Sep 17 16:54:01 UTC 2022
Modified Files: src/sys/dev/isa: if_eg.c Log Message: Convert an open-coded check for M_PKTHDR + panic into a KASSERT(). To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/dev/isa/if_eg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/isa/if_eg.c diff -u src/sys/dev/isa/if_eg.c:1.101 src/sys/dev/isa/if_eg.c:1.102 --- src/sys/dev/isa/if_eg.c:1.101 Sat Sep 17 16:52:26 2022 +++ src/sys/dev/isa/if_eg.c Sat Sep 17 16:54:01 2022 @@ -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 <d...@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);