Skip to content

Commit

Permalink
net: fix warning about non-const string
Browse files Browse the repository at this point in the history
Since dev_set_name takes a printf style string, new gcc complains
if arg is not const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 10, 2009
1 parent 7546dd9 commit a220547
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ int netdev_register_kobject(struct net_device *net)
dev->groups = groups;

BUILD_BUG_ON(BUS_ID_SIZE < IFNAMSIZ);
dev_set_name(dev, net->name);
dev_set_name(dev, "%s", net->name);

#ifdef CONFIG_SYSFS
*groups++ = &netstat_group;
Expand Down

0 comments on commit a220547

Please sign in to comment.