Skip to contentSkip to conversation

net: inet_diag_handler structs can be const

PATCH Applied Eric Dumazet 2 participants 2 messages Nov 17, 2008 – Nov 19, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: inet_diag_handler structs can be const

---

net/dccp/diag.c     |    2 +-
net/ipv4/tcp_diag.c |    2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
net/dccp/diag.c +1 -1
index d8a3509..d1e1003 100644
@@ -45,7 +45,7 @@ static void dccp_diag_get_info(struct sock *sk, struct inet_diag_msg *r,
 		dccp_get_info(sk, _info);
 }
 
-static struct inet_diag_handler dccp_diag_handler = {
+static const struct inet_diag_handler dccp_diag_handler = {
 	.idiag_hashinfo	 = &dccp_hashinfo,
 	.idiag_get_info	 = dccp_diag_get_info,
 	.idiag_type	 = DCCPDIAG_GETSOCK,
net/ipv4/tcp_diag.c +1 -1
index 838d491..fcbcd4f 100644
@@ -34,7 +34,7 @@ static void tcp_diag_get_info(struct sock *sk, struct inet_diag_msg *r,
 		tcp_get_info(sk, info);
 }
 
-static struct inet_diag_handler tcp_diag_handler = {
+static const struct inet_diag_handler tcp_diag_handler = {
 	.idiag_hashinfo	 = &tcp_hashinfo,
 	.idiag_get_info	 = tcp_diag_get_info,
 	.idiag_type	 = TCPDIAG_GETSOCK,