[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1508797129.1955.5.camel@perches.com>
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