net: snmp: fix the wrong ICMP_MIB_MAX value
authorShan Wei <shanwei@cn.fujitsu.com>
Wed, 1 Dec 2010 18:04:43 +0000 (18:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Dec 2010 21:27:31 +0000 (13:27 -0800)
__ICMP_MIB_MAX is equal to the total number of icmp mib,
So no need to add 1. This wastes 4/8 bytes memory.

Change it to be same as ICMP6_MIB_MAX, TCP_MIB_MAX, UDP_MIB_MAX.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/snmp.h

index a0e61806d480bed5d13198b9852c10d482c04556..aebb55383c43cc27705942c9cdab826c842af263 100644 (file)
@@ -61,8 +61,7 @@ struct ipstats_mib {
 
 /* ICMP */
 #define ICMP_MIB_DUMMY __ICMP_MIB_MAX
-#define ICMP_MIB_MAX   (__ICMP_MIB_MAX + 1)
-
+#define ICMP_MIB_MAX   __ICMP_MIB_MAX
 struct icmp_mib {
        unsigned long   mibs[ICMP_MIB_MAX];
 };
This page took 0.027542 seconds and 5 git commands to generate.