summaryrefslogtreecommitdiffstats
path: root/sys/netipx/ipx_usrreq.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-01-02 15:29:29 +0000
committerrwatson <rwatson@FreeBSD.org>2005-01-02 15:29:29 +0000
commitb45de8ac1b66f472795961a882cd0c2e057271de (patch)
tree8377e4c851c66c47898e34ffc1c5d7360e1b3387 /sys/netipx/ipx_usrreq.c
parent232fe9e06de6086ac1663d5e5f95b3a3597fed66 (diff)
downloadFreeBSD-src-b45de8ac1b66f472795961a882cd0c2e057271de.zip
FreeBSD-src-b45de8ac1b66f472795961a882cd0c2e057271de.tar.gz
Restructure ipx_input() return code to match similar code in netinet,
avoiding a goto.
Diffstat (limited to 'sys/netipx/ipx_usrreq.c')
-rw-r--r--sys/netipx/ipx_usrreq.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c
index 5a41754..88f36c4 100644
--- a/sys/netipx/ipx_usrreq.c
+++ b/sys/netipx/ipx_usrreq.c
@@ -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
OpenPOWER on IntegriCloud