[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] checkspace: allow spaces in cpp directives.
commit 1f1d943999bd0ade5153074bb90ee9a40440825f
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
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";
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits