lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 19 Oct 2010 13:24:02 +0800
From:	Changli Gao <xiaosuo@...il.com>
To:	"David S. Miller" <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, Changli Gao <xiaosuo@...il.com>
Subject: [PATCH] net: unix: make some variables constant

And since ctl_table.data is initialized later, we don't need to initialize
the data member of the template variable unix_table.

Signed-off-by: Changli Gao <xiaosuo@...il.com>
---
 net/unix/sysctl_net_unix.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c
index 397cffe..1114ccc 100644
--- a/net/unix/sysctl_net_unix.c
+++ b/net/unix/sysctl_net_unix.c
@@ -15,10 +15,9 @@
 
 #include <net/af_unix.h>
 
-static ctl_table unix_table[] = {
+const static ctl_table unix_table[] = {
 	{
 		.procname	= "max_dgram_qlen",
-		.data		= &init_net.unx.sysctl_max_dgram_qlen,
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec
@@ -26,7 +25,7 @@ static ctl_table unix_table[] = {
 	{ }
 };
 
-static struct ctl_path unix_path[] = {
+const static struct ctl_path unix_path[] = {
 	{ .procname = "net", },
 	{ .procname = "unix", },
 	{ },
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ