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
This commit is contained in:
Robert Watson 2006-01-14 00:05:44 +00:00
parent 2ab392c630
commit 71c47d1480

View File

@ -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)