diff options
author | Thomas Graf <tgraf@infradead.org> | 2010-11-15 23:31:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-17 14:28:25 -0500 |
commit | ca7479ebbd9f7621646bf2792cb7143647f035bb (patch) | |
tree | 065c591e2ad710f8bf4827fc9d846b2ba7867703 /include/linux/inetdevice.h | |
parent | f8ff182c716c6f11ca3061961f5722f26a14e101 (diff) |
inet: Define IPV4_DEVCONF_MAX
Define IPV4_DEVCONF_MAX to get rid of MAX - 1 notation.
Signed-off-by: Thomas Graf <tgraf@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/inetdevice.h')
-rw-r--r-- | include/linux/inetdevice.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 380ba6bc5db1..2b86eaf11773 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -41,10 +41,12 @@ enum | |||
41 | __IPV4_DEVCONF_MAX | 41 | __IPV4_DEVCONF_MAX |
42 | }; | 42 | }; |
43 | 43 | ||
44 | #define IPV4_DEVCONF_MAX (__IPV4_DEVCONF_MAX - 1) | ||
45 | |||
44 | struct ipv4_devconf { | 46 | struct ipv4_devconf { |
45 | void *sysctl; | 47 | void *sysctl; |
46 | int data[__IPV4_DEVCONF_MAX - 1]; | 48 | int data[IPV4_DEVCONF_MAX]; |
47 | DECLARE_BITMAP(state, __IPV4_DEVCONF_MAX - 1); | 49 | DECLARE_BITMAP(state, IPV4_DEVCONF_MAX); |
48 | }; | 50 | }; |
49 | 51 | ||
50 | struct in_device { | 52 | struct in_device { |
@@ -90,7 +92,7 @@ static inline void ipv4_devconf_set(struct in_device *in_dev, int index, | |||
90 | 92 | ||
91 | static inline void ipv4_devconf_setall(struct in_device *in_dev) | 93 | static inline void ipv4_devconf_setall(struct in_device *in_dev) |
92 | { | 94 | { |
93 | bitmap_fill(in_dev->cnf.state, __IPV4_DEVCONF_MAX - 1); | 95 | bitmap_fill(in_dev->cnf.state, IPV4_DEVCONF_MAX); |
94 | } | 96 | } |
95 | 97 | ||
96 | #define IN_DEV_CONF_GET(in_dev, attr) \ | 98 | #define IN_DEV_CONF_GET(in_dev, attr) \ |