]> git.karo-electronics.de Git - linux-beck.git/commitdiff
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 64741b9386329ba6a76b00ea660d78983d2efb8a..5cb830c78990a8642aed4df591b7109260de685c 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;