Subject: Re: [PATCH 2/4] tcpv6: trivial formatting changes to send_(ack|reset)

From: Arnaldo Carvalho de Melo <[email-masked]>
Date: Thu, 9 Oct 2008 11:16:58 -0300

Em Thu, Oct 09, 2008 at 12:58:07PM +0300, Ilpo Järvinen escreveu:
> On Thu, 9 Oct 2008, YOSHIFUJI Hideaki / ???? wrote:
> 
> > In article <[email-masked]> (at Thu,  9 Oct 2008 12:35:35 +0300), "Ilpo Järvinen" <[email-masked]> says:
> > 
> > > Signed-off-by: Ilpo Järvinen <[email-masked]>
> > > ---
> > >  net/ipv6/tcp_ipv6.c |    7 +++----
> > >  1 files changed, 3 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
> > > index 2084f5a..3f268a3 100644
> > > --- a/net/ipv6/tcp_ipv6.c
> > > +++ b/net/ipv6/tcp_ipv6.c
> > > @@ -948,7 +948,7 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb)
> > >  	struct flowi fl;
> > >  	struct net *net = dev_net(skb->dst->dev);
> > >  	struct sock *ctl_sk = net->ipv6.tcp_sk;
> > > -	unsigned int tot_len = sizeof(*th);
> > > +	unsigned int tot_len = sizeof(struct tcphdr);
> > >  #ifdef CONFIG_TCP_MD5SIG
> > >  	struct tcp_md5sig_key *key;
> > >  #endif
> > 
> > I usually prefer sizeof(var) (or sizeof(*ptr)) over sizeof(type).
> > Could you justify this change?
> 
> My point was to make those two functions as equal as possible before merge 
> so that it's more easier to track what happens at the merge, both 
> versions pre-existed anyway. Sure I don't have much opinion either way.

I agree with Yoshifuji, albeit it is unlikely that the type of that
variable will change 8)

- Arnaldo