Restructure ipx_input() return code to match similar code in netinet,

avoiding a goto.
This commit is contained in:
rwatson 2005-01-02 15:29:29 +00:00
parent 232fe9e06d
commit b45de8ac1b

View File

@ -151,18 +151,16 @@ ipx_input(m, ipxp)
}
}
ipxp->ipxp_rpt = ipx->ipx_pt;
if (!(ipxp->ipxp_flags & IPXP_RAWIN) ) {
if ((ipxp->ipxp_flags & IPXP_RAWIN) == 0) {
m->m_len -= sizeof(struct ipx);
m->m_pkthdr.len -= sizeof(struct ipx);
m->m_data += sizeof(struct ipx);
}
if (sbappendaddr(&ipxp->ipxp_socket->so_rcv, (struct sockaddr *)&ipx_ipx,
m, (struct mbuf *)NULL) == 0)
goto bad;
sorwakeup(ipxp->ipxp_socket);
return;
bad:
m_freem(m);
if (sbappendaddr(&ipxp->ipxp_socket->so_rcv,
(struct sockaddr *)&ipx_ipx, m, NULL) == 0)
m_freem(m);
else
sorwakeup(ipxp->ipxp_socket);
}
void