Skip to content

Commit 402e23b

Browse files
committed
SUNRPC: Fix stupid typo in xs_sock_set_reuseport
Yes, kernel_setsockopt() hates you for using a char argument. Signed-off-by: Trond Myklebust <[email protected]>
1 parent 54c0987 commit 402e23b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

net/sunrpc/xprtsock.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,9 +1629,10 @@ static unsigned short xs_get_random_port(void)
16291629
*/
16301630
static void xs_sock_set_reuseport(struct socket *sock)
16311631
{
1632-
char opt = 1;
1632+
int opt = 1;
16331633

1634-
kernel_setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt));
1634+
kernel_setsockopt(sock, SOL_SOCKET, SO_REUSEPORT,
1635+
(char *)&opt, sizeof(opt));
16351636
}
16361637

16371638
static unsigned short xs_sock_getport(struct socket *sock)

0 commit comments

Comments
 (0)