tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit f39ba52029c946304cc5a67fa93ca9aab10b2941
parent 99a5aecbc779985629abce22dfc00a4e9d6ccb9e
Author: Nick Mathewson <nickm@torproject.org>
Date:   Fri, 10 Jan 2020 15:32:34 -0500

checkSpace: be more careful about bad function headers.

Previously we would forbid macro indentations like this:

FOO({
  int x;
  })

But clang-format sometimes generates those.

Diffstat:
Mscripts/maint/checkSpace.pl | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/maint/checkSpace.pl b/scripts/maint/checkSpace.pl @@ -208,7 +208,7 @@ for my $fn (@ARGV) { ($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ && ! /^(?:const |static )*(?:typedef|struct|union)[^\(]*$/ && ! /= *\{$/ && ! /;$/) && ! /^[a-zA-Z0-9_]+\s*:/) { - if (/.\{$/){ + if (/[^,\s]\s*\{$/){ msg "fn() {:$fn:$.\n"; $in_func_head = 0; } elsif (/^\S[^\(]* +\**[a-zA-Z0-9_]+\(/) {