From: stephen hemminger Date: Mon, 29 Nov 2010 09:47:47 +0000 (+0000) Subject: gre: minor cleanups X-Git-Tag: v3.0~2504^2~383 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=407d6fcbfdd011bcc2dd9e6923c5cca00abbfc6f;p=platform%2Fkernel%2Flinux-amlogic.git gre: minor cleanups Use strcpy() rather the sprintf() for the case where name is getting generated. Fix indentation. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 897210a..98769c39 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -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);