Skip to content

Commit

Permalink
SUNRPC: Fix stupid typo in xs_sock_set_reuseport
Browse files Browse the repository at this point in the history
Yes, kernel_setsockopt() hates you for using a char argument.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
trondmypd committed Feb 9, 2015
1 parent 54c0987 commit 402e23b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1629,9 +1629,10 @@ static unsigned short xs_get_random_port(void)
*/
static void xs_sock_set_reuseport(struct socket *sock)
{
char opt = 1;
int opt = 1;

kernel_setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt));
kernel_setsockopt(sock, SOL_SOCKET, SO_REUSEPORT,
(char *)&opt, sizeof(opt));
}

static unsigned short xs_sock_getport(struct socket *sock)
Expand Down

0 comments on commit 402e23b

Please sign in to comment.