[tor-commits] [tor/master] checkspace: allow spaces in cpp directives.
nickm at torproject.org
nickm at torproject.org
Thu Mar 5 13:25:48 UTC 2020
commit 1f1d943999bd0ade5153074bb90ee9a40440825f
Author: Nick Mathewson <nickm at torproject.org>
Date: Fri Jan 10 08:04:28 2020 -0500
checkspace: allow spaces in cpp directives.
---
scripts/maint/checkSpace.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/maint/checkSpace.pl b/scripts/maint/checkSpace.pl
index af81db8d5..3080fafd3 100755
--- a/scripts/maint/checkSpace.pl
+++ b/scripts/maint/checkSpace.pl
@@ -128,12 +128,12 @@ for my $fn (@ARGV) {
if ($isheader) {
if ($seenguard == 0) {
- if (/ifndef\s+(\S+)/) {
+ if (/^\s*\#\s*ifndef\s+(\S+)/) {
++$seenguard;
$guardname = $1;
}
} elsif ($seenguard == 1) {
- if (/^\#define (\S+)/) {
+ if (/^\s*\#\s*define (\S+)/) {
++$seenguard;
if ($1 ne $guardname) {
msg "GUARD:$fn:$.: Header guard macro mismatch.\n";
More information about the tor-commits
mailing list