lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0803031603100.28251@kivilampi-30.cs.helsinki.fi>
Date:	Mon, 3 Mar 2008 16:08:19 +0200 (EET)
From:	"Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
To:	Arnd Hannemann <hannemann@...s.rwth-aachen.de>
cc:	Netdev <netdev@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Removing unneeded statement from tcp_ipv4.c

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 <hannemann@...s.rwth-aachen.de>
> 
> 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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ