Skip to content

Commit e0e4b8d

Browse files
Mao Wenandavem330
authored andcommitted
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 <[email protected]> Acked-by: Neil Horman <[email protected]> Acked-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8e2ef6a commit e0e4b8d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/sctp/socket.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,8 @@ static int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
399399
* detection.
400400
*/
401401
addr->v4.sin_port = htons(snum);
402-
if ((ret = sctp_get_port_local(sk, addr))) {
402+
if (sctp_get_port_local(sk, addr))
403403
return -EADDRINUSE;
404-
}
405404

406405
/* Refresh ephemeral port. */
407406
if (!bp->port)

0 commit comments

Comments
 (0)