From: Nick Mathewson Date: Fri, 10 Jan 2020 14:25:04 +0000 (-0500) Subject: checkSpace: don't treat an unindented label as starting a function. X-Git-Tag: tor-0.4.5.0-alpha-dev~160^2~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c8fae6b5c8c76089da37c169defbc63a53300a3f;p=thirdparty%2Ftor.git checkSpace: don't treat an unindented label as starting a function. --- diff --git a/scripts/maint/checkSpace.pl b/scripts/maint/checkSpace.pl index a5480d5ba4..bf1c69e00a 100755 --- a/scripts/maint/checkSpace.pl +++ b/scripts/maint/checkSpace.pl @@ -207,7 +207,7 @@ for my $fn (@ARGV) { if ($in_func_head || ($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ && ! /^(?:const |static )*(?:typedef|struct|union)[^\(]*$/ && - ! /= *\{$/ && ! /;$/)) { + ! /= *\{$/ && ! /;$/) && ! /^[a-zA-Z0-9_]+\s*:/) { if (/.\{$/){ msg "fn() {:$fn:$.\n"; $in_func_head = 0;