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]
Date:   Mon, 23 Oct 2017 15:18:49 -0700
From:   Joe Perches <joe@...ches.com>
To:     Carlo Marcelo Arenas Belón <carenas@...il.com>,
        linux-kernel@...r.kernel.org
Cc:     apw@...onical.com
Subject: Re: [PATCH] checkpatch: avoid false positive closing bracket with
 initializers

On Mon, 2017-10-23 at 06:06 -0700, Carlo Marcelo Arenas Belón wrote:
> when multiple closing brackets are being used for an universal zero
> intializer as in (for example):
> 
>   struct timespec tv[10] = {{0}};

No objection.

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -4423,7 +4423,7 @@ sub process {
>  
>  # closing brace should have a space following it when it has anything
>  # on the line
> -		if ($line =~ /}(?!(?:,|;|\)))\S/) {
> +		if ($line =~ /}(?!(?:,|;|}|\)))\S/) {

But perhaps this is easier to understand:

		if ($line =~ /}(?![,;}\)]\S/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ