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: <20200223.211445.2002575104492612118.davem@davemloft.net>
Date:   Sun, 23 Feb 2020 21:14:45 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     lirongqing@...du.com
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH][net-next] tcpv6: define th variable only once

From: Li RongQing <lirongqing@...du.com>
Date: Sun, 23 Feb 2020 15:56:54 +0800

> @@ -51,7 +51,7 @@ static struct sk_buff *tcp6_gso_segment(struct sk_buff *skb,
>  
>  	if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
>  		const struct ipv6hdr *ipv6h = ipv6_hdr(skb);
> -		struct tcphdr *th = tcp_hdr(skb);
> +		th = tcp_hdr(skb);
>  
>  		/* Set up pseudo header, usually expect stack to have done

This doesn't leave a new line before local variable declarations and
statements.

But even more interesting, is that the top level declaration of 'th'
can be removed the solve this warning and restricts the scope of 'th'
to where it is actually used.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ