diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-01-02 15:19:24 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-01-02 15:19:24 +0000 |
commit | 1a1b431cbf2d694fd8f9f16ab0ea6bf4ce674dc9 (patch) | |
tree | 45da5300a0535197ab5284b02af5bc427bd1b9d1 | |
parent | 3d41eea355692fef65231d0c082f74a93dfba2ea (diff) | |
download | FreeBSD-src-1a1b431cbf2d694fd8f9f16ab0ea6bf4ce674dc9.zip FreeBSD-src-1a1b431cbf2d694fd8f9f16ab0ea6bf4ce674dc9.tar.gz |
Use KASSERT() in preference to if()panic().
-rw-r--r-- | sys/netipx/ipx_usrreq.c | 3 | ||||
-rw-r--r-- | sys/netipx/spx_usrreq.c | 5 |
2 files changed, 2 insertions, 6 deletions
diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c index 47acdb1..db0aadd 100644 --- a/sys/netipx/ipx_usrreq.c +++ b/sys/netipx/ipx_usrreq.c @@ -128,8 +128,7 @@ ipx_input(m, ipxp) struct ifnet *ifp = m->m_pkthdr.rcvif; struct sockaddr_ipx ipx_ipx; - if (ipxp == NULL) - panic("No ipxpcb"); + KASSERT(ipxp != NULL, ("ipx_input: NUL ipxpcb")); /* * Construct sockaddr format source address. * Stuff source address and datagram in user buffer. diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index a03541b..4aa93a3 100644 --- a/sys/netipx/spx_usrreq.c +++ b/sys/netipx/spx_usrreq.c @@ -163,10 +163,7 @@ spx_input(m, ipxp) short ostate = 0; spxstat.spxs_rcvtotal++; - if (ipxp == NULL) { - panic("No ipxpcb in spx_input\n"); - return; - } + KASSERT(ipxp != NULL, ("spx_input: NULL ipxpcb")); cb = ipxtospxpcb(ipxp); if (cb == NULL) |