Explorar o código

af_unix: constify the sock parameter in unix_sk()

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>
Paul Moore %!s(int64=10) %!d(string=hai) anos
pai
achega
c72eda0608
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      include/net/af_unix.h

+ 1 - 1
include/net/af_unix.h

@@ -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;
 }