From: Shan Wei <shanwei@cn.fujitsu.com>
To: David Miller <davem@davemloft.net>
Cc: Network-Maillist <netdev@vger.kernel.org>,
Shan Wei <shanwei@cn.fujitsu.com>
Subject: [PATCH 2/3] net: snmp: fix the wrong ICMP_MIB_MAX value
Date: Mon, 29 Nov 2010 14:53:55 +0800 [thread overview]
Message-ID: <4CF34E03.8020504@cn.fujitsu.com> (raw)
__ICMP_MIB_MAX is equal to the total number of icmp mib,
So no need to add 1. This wastes 4/8 bytes memory.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
include/net/snmp.h | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/include/net/snmp.h b/include/net/snmp.h
index 835c587..762e2ab 100644
--- a/include/net/snmp.h
+++ b/include/net/snmp.h
@@ -60,8 +60,7 @@ struct ipstats_mib {
};
/* ICMP */
-#define ICMP_MIB_MAX (__ICMP_MIB_MAX + 1)
-
+#define ICMP_MIB_MAX __ICMP_MIB_MAX
struct icmp_mib {
unsigned long mibs[ICMP_MIB_MAX];
};
--
1.6.3.3
next reply other threads:[~2010-11-29 6:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-29 6:53 Shan Wei [this message]
2010-12-01 20:35 ` [PATCH 2/3] net: snmp: fix the wrong ICMP_MIB_MAX value David Miller
2010-12-01 20:36 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CF34E03.8020504@cn.fujitsu.com \
--to=shanwei@cn.fujitsu.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.