Skip to content

Commit 0fc95de

Browse files
alex-maydanikdavem330
authored andcommitted
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: Alex Maydanik <alexander.maydanik@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5891cd5 commit 0fc95de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/socket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3448,7 +3448,7 @@ EXPORT_SYMBOL(kernel_connect);
34483448
* @addr: address holder
34493449
*
34503450
* Fills the @addr pointer with the address which the socket is bound.
3451-
* Returns 0 or an error code.
3451+
* Returns the length of the address in bytes or an error code.
34523452
*/
34533453

34543454
int kernel_getsockname(struct socket *sock, struct sockaddr *addr)
@@ -3463,7 +3463,7 @@ EXPORT_SYMBOL(kernel_getsockname);
34633463
* @addr: address holder
34643464
*
34653465
* Fills the @addr pointer with the address which the socket is connected.
3466-
* Returns 0 or an error code.
3466+
* Returns the length of the address in bytes or an error code.
34673467
*/
34683468

34693469
int kernel_getpeername(struct socket *sock, struct sockaddr *addr)

0 commit comments

Comments
 (0)