[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] checkSpace: don't treat an unindented label as starting a function.
commit c8fae6b5c8c76089da37c169defbc63a53300a3f
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Fri Jan 10 09:25:04 2020 -0500
checkSpace: don't treat an unindented label as starting a function.
---
scripts/maint/checkSpace.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/maint/checkSpace.pl b/scripts/maint/checkSpace.pl
index a5480d5ba..bf1c69e00 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;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits