forked from Minki/linux
gre: minor cleanups
Use strcpy() rather the sprintf() for the case where name is getting generated. Fix indentation. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f2cd2d3e9b
commit
407d6fcbfd
@ -405,11 +405,11 @@ static struct ip_tunnel *ipgre_tunnel_locate(struct net *net,
|
||||
if (parms->name[0])
|
||||
strlcpy(name, parms->name, IFNAMSIZ);
|
||||
else
|
||||
sprintf(name, "gre%%d");
|
||||
strcpy(name, "gre%d");
|
||||
|
||||
dev = alloc_netdev(sizeof(*t), name, ipgre_tunnel_setup);
|
||||
if (!dev)
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
dev_net_set(dev, net);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user