svn commit: r342905 - head/sys/kern
Gleb Smirnoff
glebius at FreeBSD.org
Thu Jan 10 00:25:14 UTC 2019
Author: glebius
Date: Thu Jan 10 00:25:12 2019
New Revision: 342905
URL: https://svnweb.freebsd.org/changeset/base/342905
Log:
Simplify sosetopt() so that function has single return point. No
functional change.
Modified:
head/sys/kern/uipc_socket.c
Modified: head/sys/kern/uipc_socket.c
==============================================================================
--- head/sys/kern/uipc_socket.c Thu Jan 10 00:10:12 2019 (r342904)
+++ head/sys/kern/uipc_socket.c Thu Jan 10 00:25:12 2019 (r342905)
@@ -2755,12 +2755,10 @@ sosetopt(struct socket *so, struct sockopt *sopt)
CURVNET_SET(so->so_vnet);
error = 0;
if (sopt->sopt_level != SOL_SOCKET) {
- if (so->so_proto->pr_ctloutput != NULL) {
+ if (so->so_proto->pr_ctloutput != NULL)
error = (*so->so_proto->pr_ctloutput)(so, sopt);
- CURVNET_RESTORE();
- return (error);
- }
- error = ENOPROTOOPT;
+ else
+ error = ENOPROTOOPT;
} else {
switch (sopt->sopt_name) {
case SO_ACCEPTFILTER:
More information about the svn-src-all
mailing list