]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: change return type of sctp_get_port_local
authorMao Wenan <maowenan@huawei.com>
Thu, 12 Sep 2019 04:02:17 +0000 (12:02 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Sep 2019 20:06:20 +0000 (22:06 +0200)
commit9e92c2ba6073d582264ef8918d12c4b833dca765
tree32c066b1f02081a3f3194c51342ba2a278bd3349
parent764b43d2c26accd743cf4b09469171b91199ad6c
sctp: change return type of sctp_get_port_local

Currently sctp_get_port_local() returns a long
which is either 0,1 or a pointer casted to long.
It's neither of the callers use the return value since
commit 868a066da09c ("net: sctp: simplify sctp_get_port").
Now two callers are sctp_get_port and sctp_do_bind,
they actually assumend a casted to an int was the same as
a pointer casted to a long, and they don't save the return
value just check whether it is zero or non-zero, so
it would better change return type from long to int for
sctp_get_port_local.

Signed-off-by: Mao Wenan <maowenan@huawei.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c