netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: YOSHIFUJI Hideaki <yoshfuji@st-paulia.net>, netdev@vger.kernel.org
Subject: Re: [PATCH 1/1][TCP]: break missing at end of switch statement
Date: Mon, 1 Oct 2007 18:25:30 +0100	[thread overview]
Message-ID: <200710011825.30434@strip-the-willow> (raw)
In-Reply-To: <20071001143108.GA5648@ghostprotocols.net>

Arnaldo, Al Viro, and Yoshifuji -

sorry for having wasted your time with this one. You are right, that was complete nonsense. 
I don't know where my mind was - even my test program used to `prove' this was screwed up.

So nothing wrong here and thank you very much for your clarifying comments.

|  > |  > --- 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
|  
|  

      reply	other threads:[~2007-10-01 17:25 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
2007-10-01 17:25       ` Gerrit Renker [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=200710011825.30434@strip-the-willow \
    --to=gerrit@erg.abdn.ac.uk \
    --cc=acme@ghostprotocols.net \
    --cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).