Reduce the nesting level of a code block that doesn't need to be in

an else clause.
This commit is contained in:
Don Lewis 2002-07-11 23:13:31 +00:00
parent 4f6799e61e
commit 142b2bd644
2 changed files with 20 additions and 26 deletions

View file

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

View file

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