indent correctly

dev
10077240 2019-01-14 15:10:42 +08:00
parent 939d46c3a9
commit a157343e24
1 changed files with 10 additions and 9 deletions

View File

@ -1321,19 +1321,20 @@ tcp_connect(struct tcpcb *tp, struct sockaddr *nam, struct thread *td)
error = EADDRINUSE;
goto out;
}
// inp->inp_lport != lport means in_pcbconnect_setup selected new port to inp->inp_lport.
// inp will inhash.
// inp->inp_lport != lport means in_pcbconnect_setup selected new port to inp->inp_lport.
// inp will inhash.
if (in_pcbinshash(inp) != 0) {
inp->inp_laddr.s_addr = INADDR_ANY;
inp->inp_lport = 0;
return (EAGAIN);
}
inp->inp_laddr.s_addr = INADDR_ANY;
inp->inp_lport = 0;
return (EAGAIN);
}
}
else
{
// app call bind() and connect(), lport is set when bind, and the inp is inhashed in bind() function.
// in_pcbconnect_setup() update inp->inp_faddr/inp->inp_fport, so inp should be rehashed.
in_pcbrehash(inp);
// app call bind() and connect(), lport is set when bind, and the inp is inhashed in bind() function.
// in_pcbconnect_setup() update inp->inp_faddr/inp->inp_fport, so inp should be rehashed.
in_pcbrehash(inp);
}
if (anonport) {