mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
rpc: Convert an SOLISTENING check to an assertion
Per the comment, this socket should always be a listening socket. MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
40fcdb9366
commit
7fabaac221
|
@ -328,11 +328,9 @@ svc_vc_accept(struct socket *head, struct socket **sop)
|
|||
int error = 0;
|
||||
short nbio;
|
||||
|
||||
/* XXXGL: shouldn't that be an assertion? */
|
||||
if (!SOLISTENING(head)) {
|
||||
error = EINVAL;
|
||||
goto done;
|
||||
}
|
||||
KASSERT(SOLISTENING(head),
|
||||
("%s: socket %p is not listening", __func__, head));
|
||||
|
||||
#ifdef MAC
|
||||
error = mac_socket_check_accept(curthread->td_ucred, head);
|
||||
if (error != 0)
|
||||
|
|
Loading…
Reference in a new issue