Date: Wed, 22 May 2013 14:58:28 +0200 From: Luigi Rizzo <rizzo@iet.unipi.it> To: net@freebsd.org Subject: RFC: removing redundant checks in ether_input_internal() Message-ID: <20130522125828.GA93728@onelab2.iet.unipi.it>
next in thread | raw e-mail | index | archive | help
if_ethersubr.c :: ether_input_internal() is only called as follows:
static void
ether_nh_input(struct mbuf *m)
{
ether_input_internal(m->m_pkthdr.rcvif, m);
}
hence the following checks in the body are unnecessary:
if (m->m_pkthdr.rcvif == NULL) {
if_printf(ifp, "discard frame w/o interface pointer\n");
ifp->if_ierrors++;
m_freem(m);
return;
}
#ifdef DIAGNOSTIC
if (m->m_pkthdr.rcvif != ifp) {
if_printf(ifp, "Warning, frame marked as received on %s\n",
m->m_pkthdr.rcvif->if_xname);
}
#endif
Any objection if i remove them ?
cheers
luigi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130522125828.GA93728>
