summaryrefslogtreecommitdiff
path: root/scripts/maint
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-01-10 08:04:28 -0500
committerNick Mathewson <nickm@torproject.org>2020-02-06 14:33:05 -0500
commit1f1d943999bd0ade5153074bb90ee9a40440825f (patch)
treeddb58daa7402235b84f7fa96dca7badd9febb77e /scripts/maint
parent15819cde6163e43ac86d1be078a7b6b4e3ed7a02 (diff)
downloadtor-1f1d943999bd0ade5153074bb90ee9a40440825f.tar.gz
tor-1f1d943999bd0ade5153074bb90ee9a40440825f.zip
checkspace: allow spaces in cpp directives.
Diffstat (limited to 'scripts/maint')
-rwxr-xr-xscripts/maint/checkSpace.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/maint/checkSpace.pl b/scripts/maint/checkSpace.pl
index af81db8d53..3080fafd3e 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";