public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta•com>
To: David Miller <davem@davemloft•net>
Cc: netdev@vger•kernel.org
Subject: [PATCH 1/3] gre: minor cleanups
Date: Mon, 29 Nov 2010 11:47:47 -0800	[thread overview]
Message-ID: <20101129194805.666257322@vyatta.com> (raw)
In-Reply-To: 20101129194746.724222156@vyatta.com

[-- Attachment #1: gre-fix-trivial.patch --]
[-- Type: text/plain, Size: 602 bytes --]

Use strcpy() rather the sprintf() for the case where name is getting
generated.  Fix indentation.

Signed-off-by: Stephen Hemminger <shemminger@vyatta•com>

--- a/net/ipv4/ip_gre.c	2010-11-28 11:28:48.684091117 -0800
+++ b/net/ipv4/ip_gre.c	2010-11-28 11:29:21.839822531 -0800
@@ -405,11 +405,11 @@ static struct ip_tunnel *ipgre_tunnel_lo
 	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);
 



  reply	other threads:[~2010-11-29 19:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 19:47 [PATCH 0/3] Tunneling minor patches Stephen Hemminger
2010-11-29 19:47 ` Stephen Hemminger [this message]
2010-11-29 19:47 ` [PATCH 2/3] gre: add module alias for gre0 tunnel device Stephen Hemminger
2010-11-29 19:47 ` [PATCH 3/3] ipip: add module alias for tunl0 " Stephen Hemminger
2010-11-30  7:19   ` Eric Dumazet
2010-11-30  7:55     ` Changli Gao
2010-11-30  8:21       ` Eric Dumazet
2010-11-30 16:08         ` Stephen Hemminger
2010-11-30 16:27           ` Eric Dumazet
2010-12-01 20:52 ` [PATCH 0/3] Tunneling minor patches David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101129194805.666257322@vyatta.com \
    --to=shemminger@vyatta$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox