net: snmp: fix the wrong ICMP_MIB_MAX value
Subsystems (2)
PATCH 2/3 net: snmp: fix the wrong ICMP_MIB_MAX value
__ICMP_MIB_MAX is equal to the total number of icmp mib, So no need to add 1. This wastes 4/8 bytes memory.
--- include/net/snmp.h | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
include/net/snmp.h +1 -2
@@ -60,8 +60,7 @@ struct ipstats_mib { };/* ICMP */ -#define ICMP_MIB_MAX (__ICMP_MIB_MAX + 1) - +#define ICMP_MIB_MAX __ICMP_MIB_MAXstruct icmp_mib {unsigned long mibs[ICMP_MIB_MAX ]; };
Signature · 1 line
1.6.3.3
David Miller
maintainerFrom: Shan Wei <[email protected]>
Date: Mon, 29 Nov 2010 14:53:55 +0800
include/net/snmp.h struct ipstats_mib { · line 64
Quoted 8 lines
include/net/snmp.h +1
-2@@ -60,8 +60,7 @@ struct ipstats_mib { };/* ICMP */ -#define ICMP_MIB_MAX (__ICMP_MIB_MAX + 1) - +#define ICMP_MIB_MAX __ICMP_MIB_MAXstruct icmp_mib {
In all of my trees there is an "ICMP_MIB_DUMMY" define here, and it's been there forever, I have no idea what you are patching against.
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Wed, 01 Dec 2010 12:35:50 -0800 (PST)
Quoted 6 lines
From: Shan Wei <[email protected]>
Date: Mon, 29 Nov 2010 14:53:55 +0800Quoted 3 lines
(quoted diff) +0
-0@@ -60,8 +60,7 @@ struct ipstats_mib { };
Quoted 8 lines
include/net/snmp.h struct ipstats_mib { · line 64
Quoted 5 lines
include/net/snmp.h +1
-2/* ICMP */ -#define ICMP_MIB_MAX (__ICMP_MIB_MAX + 1) - +#define ICMP_MIB_MAX __ICMP_MIB_MAXstruct icmp_mib {In all of my trees there is an "
ICMP_MIB_DUMMY" define here, and it's been there forever, I have no idea what you are patching against.
Nevermind I see that this depends upon your first patch.
Please resubmit all 3 patches once you've addressed the feedback for patch #1.