sctp: remove redundant assignment when call sctp_get_port_local
There are more parentheses in if clause when call sctp_get_port_local in sctp_do_bind, and redundant assignment to 'ret'. This patch is to do cleanup. Signed-off-by: Mao Wenan <maowenan@huawei.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8e2ef6abd4
commit
e0e4b8de10
|
@ -399,9 +399,8 @@ static int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
|
||||||
* detection.
|
* detection.
|
||||||
*/
|
*/
|
||||||
addr->v4.sin_port = htons(snum);
|
addr->v4.sin_port = htons(snum);
|
||||||
if ((ret = sctp_get_port_local(sk, addr))) {
|
if (sctp_get_port_local(sk, addr))
|
||||||
return -EADDRINUSE;
|
return -EADDRINUSE;
|
||||||
}
|
|
||||||
|
|
||||||
/* Refresh ephemeral port. */
|
/* Refresh ephemeral port. */
|
||||||
if (!bp->port)
|
if (!bp->port)
|
||||||
|
|
Loading…
Reference in New Issue