Skip to content

Commit

Permalink
net: snmp: fix the wrong ICMP_MIB_MAX value
Browse files Browse the repository at this point in the history
__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>
  • Loading branch information
Shan Wei authored and David S. Miller committed Dec 2, 2010
1 parent 2989042 commit a9527a3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/net/snmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
};
Expand Down

0 comments on commit a9527a3

Please sign in to comment.