mirror of
https://github.com/opnsense/src.git
synced 2026-04-27 17:17:19 -04:00
Reduce the nesting level of a code block that doesn't need to be in
an else clause.
This commit is contained in:
parent
4f6799e61e
commit
142b2bd644
2 changed files with 20 additions and 26 deletions
|
|
@ -931,14 +931,12 @@ tcp_getcred(SYSCTL_HANDLER_ARGS)
|
|||
if (inp == NULL) {
|
||||
error = ENOENT;
|
||||
goto outunlocked;
|
||||
} else {
|
||||
INP_LOCK(inp);
|
||||
if (inp->inp_socket == NULL) {
|
||||
error = ENOENT;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
INP_LOCK(inp);
|
||||
if (inp->inp_socket == NULL) {
|
||||
error = ENOENT;
|
||||
goto out;
|
||||
}
|
||||
error = cr_canseesocket(req->td->td_ucred, inp->inp_socket);
|
||||
if (error)
|
||||
goto out;
|
||||
|
|
@ -994,12 +992,11 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
|
|||
if (inp == NULL) {
|
||||
error = ENOENT;
|
||||
goto outunlocked;
|
||||
} else {
|
||||
INP_LOCK(inp);
|
||||
if (inp->inp_socket == NULL) {
|
||||
error = ENOENT;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
INP_LOCK(inp);
|
||||
if (inp->inp_socket == NULL) {
|
||||
error = ENOENT;
|
||||
goto out;
|
||||
}
|
||||
error = cr_canseesocket(req->td->td_ucred, inp->inp_socket);
|
||||
if (error)
|
||||
|
|
|
|||
|
|
@ -931,14 +931,12 @@ tcp_getcred(SYSCTL_HANDLER_ARGS)
|
|||
if (inp == NULL) {
|
||||
error = ENOENT;
|
||||
goto outunlocked;
|
||||
} else {
|
||||
INP_LOCK(inp);
|
||||
if (inp->inp_socket == NULL) {
|
||||
error = ENOENT;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
INP_LOCK(inp);
|
||||
if (inp->inp_socket == NULL) {
|
||||
error = ENOENT;
|
||||
goto out;
|
||||
}
|
||||
error = cr_canseesocket(req->td->td_ucred, inp->inp_socket);
|
||||
if (error)
|
||||
goto out;
|
||||
|
|
@ -994,12 +992,11 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
|
|||
if (inp == NULL) {
|
||||
error = ENOENT;
|
||||
goto outunlocked;
|
||||
} else {
|
||||
INP_LOCK(inp);
|
||||
if (inp->inp_socket == NULL) {
|
||||
error = ENOENT;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
INP_LOCK(inp);
|
||||
if (inp->inp_socket == NULL) {
|
||||
error = ENOENT;
|
||||
goto out;
|
||||
}
|
||||
error = cr_canseesocket(req->td->td_ucred, inp->inp_socket);
|
||||
if (error)
|
||||
|
|
|
|||
Loading…
Reference in a new issue