ChangeSet 1.1982.148.19, 2005/03/03 14:39:35+09:00, [EMAIL PROTECTED]

        [NET] Don't use magic number for sysctl table definition.
        
        Signed-off-by: Hideaki YOSHIFUJI <[EMAIL PROTECTED]>



 include/linux/sysctl.h |    4 +++-
 net/ipv4/devinet.c     |    2 +-
 net/ipv6/addrconf.c    |    2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)


diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h
--- a/include/linux/sysctl.h    2005-03-12 20:47:20 -08:00
+++ b/include/linux/sysctl.h    2005-03-12 20:47:20 -08:00
@@ -398,6 +398,7 @@
        NET_IPV4_CONF_FORCE_IGMP_VERSION=17,
        NET_IPV4_CONF_ARP_ANNOUNCE=18,
        NET_IPV4_CONF_ARP_IGNORE=19,
+       __NET_IPV4_CONF_MAX
 };
 
 /* /proc/sys/net/ipv4/netfilter */
@@ -476,7 +477,8 @@
        NET_IPV6_REGEN_MAX_RETRY=14,
        NET_IPV6_MAX_DESYNC_FACTOR=15,
        NET_IPV6_MAX_ADDRESSES=16,
-       NET_IPV6_FORCE_MLD_VERSION=17
+       NET_IPV6_FORCE_MLD_VERSION=17,
+       __NET_IPV6_MAX
 };
 
 /* /proc/sys/net/ipv6/icmp */
diff -Nru a/net/ipv4/devinet.c b/net/ipv4/devinet.c
--- a/net/ipv4/devinet.c        2005-03-12 20:47:20 -08:00
+++ b/net/ipv4/devinet.c        2005-03-12 20:47:20 -08:00
@@ -1212,7 +1212,7 @@
 
 static struct devinet_sysctl_table {
        struct ctl_table_header *sysctl_header;
-       ctl_table               devinet_vars[20];
+       ctl_table               devinet_vars[__NET_IPV4_CONF_MAX];
        ctl_table               devinet_dev[2];
        ctl_table               devinet_conf_dir[2];
        ctl_table               devinet_proto_dir[2];
diff -Nru a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
--- a/net/ipv6/addrconf.c       2005-03-12 20:47:20 -08:00
+++ b/net/ipv6/addrconf.c       2005-03-12 20:47:20 -08:00
@@ -3212,7 +3212,7 @@
 static struct addrconf_sysctl_table
 {
        struct ctl_table_header *sysctl_header;
-       ctl_table addrconf_vars[18];
+       ctl_table addrconf_vars[__NET_IPV6_MAX];
        ctl_table addrconf_dev[2];
        ctl_table addrconf_conf_dir[2];
        ctl_table addrconf_proto_dir[2];
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to