diff mbox

net: ipv6: change %8s to %s for seq_printf of if6_seq_stop

Message ID 50986442.80009@asianux.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Chen Gang Nov. 6, 2012, 1:13 a.m. UTC
the length of ifp->idev->dev->name is 16 (IFNAMSIZ)
  in seq_printf, it is not suitable to use %8s for ifp->idev->dev->name.
  so change it to %s, since each line has not been solid any more.


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 net/ipv6/addrconf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

 		   ifp->prefix_len,

Comments

Eric Dumazet Nov. 6, 2012, 1:21 a.m. UTC | #1
On Tue, 2012-11-06 at 09:13 +0800, Chen Gang wrote:
> the length of ifp->idev->dev->name is 16 (IFNAMSIZ)
>   in seq_printf, it is not suitable to use %8s for ifp->idev->dev->name.
>   so change it to %s, since each line has not been solid any more.
> 
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
>  net/ipv6/addrconf.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 8f0b12a..9f728a8 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -3281,7 +3281,7 @@ static void if6_seq_stop(struct seq_file *seq,
> void *v)
>  static int if6_seq_show(struct seq_file *seq, void *v)
>  {
>  	struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v;
> -	seq_printf(seq, "%pi6 %02x %02x %02x %02x %8s\n",
> +	seq_printf(seq, "%pi6 %02x %02x %02x %02x %s\n",
>  		   &ifp->addr,
>  		   ifp->idev->dev->ifindex,
>  		   ifp->prefix_len,

This is a change in if6_seq_show(), not if6_seq_stop() as mentioned in
patch title.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chen Gang Nov. 6, 2012, 1:26 a.m. UTC | #2
于 2012年11月06日 09:21, Eric Dumazet 写道:
>> @@ -3281,7 +3281,7 @@ static void if6_seq_stop(struct seq_file *seq,
>> void *v)
>>  static int if6_seq_show(struct seq_file *seq, void *v)
>>  {
>>  	struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v;
>> -	seq_printf(seq, "%pi6 %02x %02x %02x %02x %8s\n",
>> +	seq_printf(seq, "%pi6 %02x %02x %02x %02x %s\n",
>>  		   &ifp->addr,
>>  		   ifp->idev->dev->ifindex,
>>  		   ifp->prefix_len,
> 
> This is a change in if6_seq_show(), not if6_seq_stop() as mentioned in
> patch title.
> 

  sorry again,

  I will send it again (although it will almost be spam).
diff mbox

Patch

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 8f0b12a..9f728a8 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3281,7 +3281,7 @@  static void if6_seq_stop(struct seq_file *seq,
void *v)
 static int if6_seq_show(struct seq_file *seq, void *v)
 {
 	struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v;
-	seq_printf(seq, "%pi6 %02x %02x %02x %02x %8s\n",
+	seq_printf(seq, "%pi6 %02x %02x %02x %02x %s\n",
 		   &ifp->addr,
 		   ifp->idev->dev->ifindex,