From: Joe Perches <joe@perches.com>
To: "YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [TCP]: Convert several length variable to unsigned.
Date: Fri, 21 Dec 2007 06:17:31 -0800 [thread overview]
Message-ID: <1198246651.6183.121.camel@localhost> (raw)
In-Reply-To: <20071221.164811.126977620.yoshfuji@linux-ipv6.org>
On Fri, 2007-12-21 at 16:48 +0900, YOSHIFUJI Hideaki / 吉藤英明 wrote:
> diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
> index 93980c3..3b4169c 100644
> --- a/net/ipv6/tcp_ipv6.c
> +++ b/net/ipv6/tcp_ipv6.c
> @@ -985,7 +985,7 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb)
> struct tcphdr *th = tcp_hdr(skb), *t1;
> struct sk_buff *buff;
> struct flowi fl;
> - int tot_len = sizeof(*th);
> + unsigned int tot_len = sizeof(*th);
> #ifdef CONFIG_TCP_MD5SIG
> struct tcp_md5sig_key *key;
> #endif
> @@ -1085,7 +1085,7 @@ static void tcp_v6_send_ack(struct tcp_timewait_sock *tw,
> struct tcphdr *th = tcp_hdr(skb), *t1;
> struct sk_buff *buff;
> struct flowi fl;
> - int tot_len = sizeof(struct tcphdr);
> + unsigned int tot_len = sizeof(struct tcphdr);
> __be32 *topt;
> #ifdef CONFIG_TCP_MD5SIG
> struct tcp_md5sig_key *key;
Unrelated, but perhaps tot_len should be initialized in
a consistent fashion?
I think unsigned int tot_len = sizeof(struct tcphdr); is more readable.
prev parent reply other threads:[~2007-12-21 14:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-21 7:48 [TCP]: Convert several length variable to unsigned YOSHIFUJI Hideaki / 吉藤英明
2007-12-21 9:47 ` David Miller
2007-12-21 14:17 ` Joe Perches [this message]
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=1198246651.6183.121.camel@localhost \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.