From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Cc: YOSHIFUJI Hideaki <yoshfuji@st-paulia.net>,
netdev@vger.kernel.org, yoshfuji@linux-ipv6.org
Subject: Re: [PATCH 1/1][TCP]: break missing at end of switch statement
Date: Mon, 1 Oct 2007 11:31:08 -0300 [thread overview]
Message-ID: <20071001143108.GA5648@ghostprotocols.net> (raw)
In-Reply-To: <200710011439.28676@strip-the-willow>
Em Mon, Oct 01, 2007 at 02:39:28PM +0100, Gerrit Renker escreveu:
> Quoting YOSHIFUJI Hideaki:
> |
> | > [TCP]: break missing at end of switch statement
> | >
> | > Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
> | > ---
> | > --- a/net/ipv4/tcp_input.c
> | > +++ b/net/ipv4/tcp_input.c
> | > @@ -3129,6 +3129,7 @@ static void tcp_reset(struct sock *sk)
> | > return;
> | > default:
> | > sk->sk_err = ECONNRESET;
> | > + break;
> | > }
> | >
> | > if (!sock_flag(sk, SOCK_DEAD))
> |
> | NAK; it is not required at all.
> |
> | --yoshfuji
> |
> If it were true what you are saying then the statement
>
> `sk->sk_err = ECONNRESET;'
>
> can go as well since it will always be overridden.
Gerrit,
It is not required. The statement you mention will be executed
when the sk_state is not one of TCP_SYN_SENT, TCP_CLOSE_WAIT or
TCP_CLOSE.
A 'break' is only needed in a label block if it is not the last
one.
- Arnaldo
next prev parent reply other threads:[~2007-10-01 14:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-01 12:32 [PATCH 1/1][TCP]: break missing at end of switch statement Gerrit Renker
2007-10-01 12:34 ` Al Viro
2007-10-01 13:02 ` Gerrit Renker
2007-10-01 13:17 ` Al Viro
2007-10-01 13:20 ` YOSHIFUJI Hideaki
2007-10-01 13:39 ` Gerrit Renker
2007-10-01 14:31 ` Arnaldo Carvalho de Melo [this message]
2007-10-01 17:25 ` Gerrit Renker
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=20071001143108.GA5648@ghostprotocols.net \
--to=acme@ghostprotocols.net \
--cc=gerrit@erg.abdn.ac.uk \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
--cc=yoshfuji@st-paulia.net \
/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.