summaryrefslogtreecommitdiffstats
path: root/sys/netipx
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-01-14 00:05:44 +0000
committerrwatson <rwatson@FreeBSD.org>2006-01-14 00:05:44 +0000
commit567602e49bc333f0ebb4bdbe1ba1858c36323246 (patch)
treef9affe07a7aac19c7924526bb470c617ee0a9097 /sys/netipx
parente68bf7df89ab1ca8350fadf2e81c907eaed56c6e (diff)
downloadFreeBSD-src-567602e49bc333f0ebb4bdbe1ba1858c36323246.zip
FreeBSD-src-567602e49bc333f0ebb4bdbe1ba1858c36323246.tar.gz
In spx_attach() and spx_detach(), there is no need to check whether the
ipxpcb is NULL or not: in attach it will be, and on detach it won't be. If for any reason these invariants don't hold true, panicking is a good idea. Noticed by: Coverity Prevent analysis tool MFC after: 3 days
Diffstat (limited to 'sys/netipx')
-rw-r--r--sys/netipx/spx_usrreq.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c
index def6eb1..3b42731 100644
--- a/sys/netipx/spx_usrreq.c
+++ b/sys/netipx/spx_usrreq.c
@@ -1352,8 +1352,6 @@ spx_attach(so, proto, td)
ipxp = sotoipxpcb(so);
cb = ipxtospxpcb(ipxp);
- if (ipxp != NULL)
- return (EISCONN);
IPX_LIST_LOCK();
error = ipx_pcballoc(so, &ipxpcb_list, td);
if (error)
@@ -1483,8 +1481,6 @@ spx_detach(so)
ipxp = sotoipxpcb(so);
cb = ipxtospxpcb(ipxp);
- if (ipxp == NULL)
- return (ENOTCONN);
IPX_LIST_LOCK();
IPX_LOCK(ipxp);
if (cb->s_state > TCPS_LISTEN)
OpenPOWER on IntegriCloud