diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-15 18:59:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-15 19:03:02 -0400 |
commit | 8fa0b315fc0c1a414da1371f1fc39523a657c192 (patch) | |
tree | 262c826218a8a0f5d5ad81d418b4b3d14ff874dc /net | |
parent | 22441cfa0c70dcd457f3c081fcf285c3bd155824 (diff) |
decnet: Fix compiler warning in dn_dev.c
Use offsetof() instead of home-brewed version.
Based upon initial patch by Steven Whitehouse and suggestions
by Ben Hutchings.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/decnet/dn_dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 2f0ac3c3eb71..ba352588e344 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -152,7 +152,7 @@ static struct dn_dev_parms dn_dev_list[] = { | |||
152 | 152 | ||
153 | #define DN_DEV_LIST_SIZE ARRAY_SIZE(dn_dev_list) | 153 | #define DN_DEV_LIST_SIZE ARRAY_SIZE(dn_dev_list) |
154 | 154 | ||
155 | #define DN_DEV_PARMS_OFFSET(x) ((int) ((char *) &((struct dn_dev_parms *)0)->x)) | 155 | #define DN_DEV_PARMS_OFFSET(x) offsetof(struct dn_dev_parms, x) |
156 | 156 | ||
157 | #ifdef CONFIG_SYSCTL | 157 | #ifdef CONFIG_SYSCTL |
158 | 158 | ||