Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754704AbYCCOIc (ORCPT ); Mon, 3 Mar 2008 09:08:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751961AbYCCOIW (ORCPT ); Mon, 3 Mar 2008 09:08:22 -0500 Received: from courier.cs.helsinki.fi ([128.214.9.1]:42884 "EHLO mail.cs.helsinki.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751330AbYCCOIV (ORCPT ); Mon, 3 Mar 2008 09:08:21 -0500 Date: Mon, 3 Mar 2008 16:08:19 +0200 (EET) From: "=?ISO-8859-1?Q?Ilpo_J=E4rvinen?=" X-X-Sender: ijjarvin@kivilampi-30.cs.helsinki.fi To: Arnd Hannemann cc: Netdev , Linux Kernel Mailing List Subject: Re: [PATCH] Removing unneeded statement from tcp_ipv4.c In-Reply-To: <47CBFBDA.7000801@nets.rwth-aachen.de> Message-ID: References: <47CBFBDA.7000801@nets.rwth-aachen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1485 Lines: 40 On Mon, 3 Mar 2008, Arnd Hannemann wrote: > Avoid setting tstamp_ok because this is done two lines later anyway. > > Signed-off-by: Arnd Hannemann > > diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c > index 00156bf..a28c4c2 100644 > --- a/net/ipv4/tcp_ipv4.c > +++ b/net/ipv4/tcp_ipv4.c > @@ -1302,15 +1302,14 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) > tmp_opt.saw_tstamp = 0; > } > > - if (tmp_opt.saw_tstamp && !tmp_opt.rcv_tsval) { > + if (tmp_opt.saw_tstamp && !tmp_opt.rcv_tsval) > /* Some OSes (unknown ones, but I see them on web server, which > * contains information interesting only for windows' > * users) do not send their stamp in SYN. It is easy case. > * We simply do not advertise TS support. > */ > tmp_opt.saw_tstamp = 0; > - tmp_opt.tstamp_ok = 0; > - } > + Please move the comment before the if (), only then can you remove those braces safely (without affecting readability, etc.). > tmp_opt.tstamp_ok = tmp_opt.saw_tstamp; > > tcp_openreq_init(req, &tmp_opt, skb); -- i. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/