ipv4: clean up cast warning in do_ip_getsockopt
authorKaroly Kemeny <karoly.kemeny@gmail.com>
Sun, 27 Jul 2014 10:29:07 +0000 (12:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jul 2014 23:31:16 +0000 (16:31 -0700)
Sparse warns because of implicit pointer cast.

v2: subject line correction, space between "void" and "*"

Signed-off-by: Karoly Kemeny <karoly.kemeny@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_sockglue.c

index 64741b9..5cb830c 100644 (file)
@@ -1319,7 +1319,7 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
                if (sk->sk_type != SOCK_STREAM)
                        return -ENOPROTOOPT;
 
-               msg.msg_control = optval;
+               msg.msg_control = (__force void *) optval;
                msg.msg_controllen = len;
                msg.msg_flags = flags;