Change soabort() from returning int to returning void, since all

consumers ignore the return value, soabort() is required to succeed,
and protocols produce errors here to report multiple freeing of the
pcb, which we hope to eliminate.
This commit is contained in:
Robert Watson 2006-03-16 07:03:14 +00:00
parent 7982e7a465
commit 92c07a345e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=156763
5 changed files with 7 additions and 9 deletions

View File

@ -266,7 +266,7 @@ sonewconn(head, connstatus)
sp->so_qstate &= ~SQ_INCOMP;
sp->so_head = NULL;
ACCEPT_UNLOCK();
(void) soabort(sp);
soabort(sp);
ACCEPT_LOCK();
}
TAILQ_INSERT_TAIL(&head->so_incomp, so, so_list);

View File

@ -434,7 +434,7 @@ soclose(so)
sp->so_qstate &= ~SQ_INCOMP;
sp->so_head = NULL;
ACCEPT_UNLOCK();
(void) soabort(sp);
soabort(sp);
ACCEPT_LOCK();
}
while ((sp = TAILQ_FIRST(&so->so_comp)) != NULL) {
@ -443,7 +443,7 @@ soclose(so)
sp->so_qstate &= ~SQ_COMP;
sp->so_head = NULL;
ACCEPT_UNLOCK();
(void) soabort(sp);
soabort(sp);
ACCEPT_LOCK();
}
ACCEPT_UNLOCK();
@ -489,7 +489,7 @@ soclose(so)
* it to acquire additional socket locks that may cause recursion or lock
* order reversals.
*/
int
void
soabort(so)
struct socket *so;
{
@ -500,9 +500,7 @@ soabort(so)
ACCEPT_LOCK();
SOCK_LOCK(so);
sotryfree(so); /* note: does not decrement the ref count */
return (error);
}
return (0);
}
int

View File

@ -266,7 +266,7 @@ sonewconn(head, connstatus)
sp->so_qstate &= ~SQ_INCOMP;
sp->so_head = NULL;
ACCEPT_UNLOCK();
(void) soabort(sp);
soabort(sp);
ACCEPT_LOCK();
}
TAILQ_INSERT_TAIL(&head->so_incomp, so, so_list);

View File

@ -720,7 +720,7 @@ syncache_socket(sc, lso, m)
INP_UNLOCK(inp);
abort2:
if (so != NULL)
(void) soabort(so);
soabort(so);
return (NULL);
}

View File

@ -487,7 +487,7 @@ int sbreserve_locked(struct sockbuf *sb, u_long cc, struct socket *so,
void sbtoxsockbuf(struct sockbuf *sb, struct xsockbuf *xsb);
int sbwait(struct sockbuf *sb);
int sb_lock(struct sockbuf *sb);
int soabort(struct socket *so);
void soabort(struct socket *so);
int soaccept(struct socket *so, struct sockaddr **nam);
struct socket *soalloc(int mflags);
int socheckuid(struct socket *so, uid_t uid);