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] [day] [month] [year] [list]
Message-ID: <20210524044303.GA30283@1wt.eu>
Date:   Mon, 24 May 2021 06:43:04 +0200
From:   Willy Tarreau <w@....eu>
To:     dzp <dzp1001167@...il.com>
Cc:     edumazet@...gle.com, davem@...emloft.net, yoshfuji@...ux-ipv6.org,
        dsahern@...nel.org, kuba@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: remove unnecessary brackets

On Mon, May 24, 2021 at 11:58:43AM +0800, dzp wrote:
> hi list,
>     this patch remove unnecessary brackets for ipv4/tcp_output.c
> 
> best regards
> 
> 
> From d736a5e4a966bbffed90a0647719dde750b29d06 Mon Sep 17 00:00:00 2001
> From: Zhiping du <zhipingdu@...cent.com>
> Date: Mon, 24 May 2021 03:37:36 +0800
> Subject: [PATCH] ipv4:tcp_output:remove unnecessary brackets
> 
> There are too many brackets. Maybe only one bracket is enough.
> 
> Signed-off-by: Zhiping Du <zhipingdu@...cent.com>
> 
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index bde781f..5455de3 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@ -2620,7 +2620,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
>  	}
>  
>  	max_segs = tcp_tso_segs(sk, mss_now);
> -	while ((skb = tcp_send_head(sk))) {
> +	while (skb = tcp_send_head(sk)) {

Please do not do this. They're here to avoid a compiler warning which
will suggest that it might be a "==" instead of "=", or will ask to add
extra parenthesis.

You've probably seen it when you compiled your patched code.

Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ