Skip to content

Commit

Permalink
decnet: Fix compiler warning in dn_dev.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
davem330 committed Oct 15, 2008
1 parent 22441cf commit 8fa0b31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/decnet/dn_dev.c
Expand Up @@ -152,7 +152,7 @@ static struct dn_dev_parms dn_dev_list[] = {

#define DN_DEV_LIST_SIZE ARRAY_SIZE(dn_dev_list)

#define DN_DEV_PARMS_OFFSET(x) ((int) ((char *) &((struct dn_dev_parms *)0)->x))
#define DN_DEV_PARMS_OFFSET(x) offsetof(struct dn_dev_parms, x)

#ifdef CONFIG_SYSCTL

Expand Down

0 comments on commit 8fa0b31

Please sign in to comment.