diff mbox

af_unix: constify the sock parameter in unix_sk()

Message ID 20151006190353.7311.36864.stgit@localhost
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Paul Moore Oct. 6, 2015, 7:03 p.m. UTC
Make unix_sk() just like inet[6]_sk() by constify'ing the sock
parameter.

Signed-off-by: Paul Moore <pmoore@redhat.com>
---
 include/net/af_unix.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Oct. 8, 2015, 11:08 a.m. UTC | #1
From: Paul Moore <pmoore@redhat.com>
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 <pmoore@redhat.com>

Applied, thanks Paul.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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