af_unix: constify the sock parameter in unix_sk()
authorPaul Moore <pmoore@redhat.com>
Tue, 6 Oct 2015 19:03:53 +0000 (15:03 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Oct 2015 11:05:18 +0000 (04:05 -0700)
Make unix_sk() just like inet[6]_sk() by constify'ing the sock
parameter.

Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/af_unix.h

index cb1b9bbda332116b6e2173b011ff9fd58f83f431..b36d837c701ec9fe94280a91df3cf1e359ad50af 100644 (file)
@@ -64,7 +64,7 @@ struct unix_sock {
        struct socket_wq        peer_wq;
 };
 
-static inline struct unix_sock *unix_sk(struct sock *sk)
+static inline struct unix_sock *unix_sk(const struct sock *sk)
 {
        return (struct unix_sock *)sk;
 }