[PATCH] af_unix: constify the sock parameter in unix_sk()

Subsystems: networking [general], networking [unix sockets], the rest

STALE4014d

2 messages, 2 authors, 2015-10-08 · open the first message on its own page

[PATCH] af_unix: constify the sock parameter in unix_sk()

From: Paul Moore <hidden>
Date: 2015-10-06 19:03:54

Make unix_sk() just like inet[6]_sk() by constify'ing the sock
parameter.

Signed-off-by: Paul Moore <redacted>
---
 include/net/af_unix.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index cb1b9bb..b36d837 100644
--- a/include/net/af_unix.h
+++ b/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;
 }

Re: [PATCH] af_unix: constify the sock parameter in unix_sk()

From: David Miller <davem@davemloft.net>
Date: 2015-10-08 10:52:19

From: Paul Moore <redacted>
Date: Tue, 06 Oct 2015 15:03:53 -0400
Make unix_sk() just like inet[6]_sk() by constify'ing the sock
parameter.

Signed-off-by: Paul Moore <redacted>
Applied, thanks Paul.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help