Commit 0fc95dec authored by Alex Maydanik's avatar Alex Maydanik Committed by David S. Miller

net: fix documentation for kernel_getsockname

Fixes return value documentation of kernel_getsockname()
and kernel_getpeername() functions.

The previous documentation wrongly specified that the return
value is 0 in case of success, however sock->ops->getname returns
the length of the address in bytes in case of success.
Signed-off-by: default avatarAlex Maydanik <alexander.maydanik@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5891cd5e
...@@ -3448,7 +3448,7 @@ EXPORT_SYMBOL(kernel_connect); ...@@ -3448,7 +3448,7 @@ EXPORT_SYMBOL(kernel_connect);
* @addr: address holder * @addr: address holder
* *
* Fills the @addr pointer with the address which the socket is bound. * Fills the @addr pointer with the address which the socket is bound.
* Returns 0 or an error code. * Returns the length of the address in bytes or an error code.
*/ */
int kernel_getsockname(struct socket *sock, struct sockaddr *addr) int kernel_getsockname(struct socket *sock, struct sockaddr *addr)
...@@ -3463,7 +3463,7 @@ EXPORT_SYMBOL(kernel_getsockname); ...@@ -3463,7 +3463,7 @@ EXPORT_SYMBOL(kernel_getsockname);
* @addr: address holder * @addr: address holder
* *
* Fills the @addr pointer with the address which the socket is connected. * Fills the @addr pointer with the address which the socket is connected.
* Returns 0 or an error code. * Returns the length of the address in bytes or an error code.
*/ */
int kernel_getpeername(struct socket *sock, struct sockaddr *addr) int kernel_getpeername(struct socket *sock, struct sockaddr *addr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment