diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-10 08:04:28 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-02-06 14:33:05 -0500 |
commit | 1f1d943999bd0ade5153074bb90ee9a40440825f (patch) | |
tree | ddb58daa7402235b84f7fa96dca7badd9febb77e /scripts/maint | |
parent | 15819cde6163e43ac86d1be078a7b6b4e3ed7a02 (diff) | |
download | tor-1f1d943999bd0ade5153074bb90ee9a40440825f.tar.gz tor-1f1d943999bd0ade5153074bb90ee9a40440825f.zip |
checkspace: allow spaces in cpp directives.
Diffstat (limited to 'scripts/maint')
-rwxr-xr-x | scripts/maint/checkSpace.pl | 4 |
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"; |