aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-09-30 01:39:24 +0000
committerNick Mathewson <nickm@torproject.org>2005-09-30 01:39:24 +0000
commit26e7a05725bcb2cea59401803371ee3fa688a8f6 (patch)
treeb81d9d8ee4672297b78012cecd17142616b2944e /contrib
parentedd15cb781934d91ae92adbe3311bf339ddbf2e8 (diff)
downloadtor-26e7a05725bcb2cea59401803371ee3fa688a8f6.tar
tor-26e7a05725bcb2cea59401803371ee3fa688a8f6.tar.gz
even better function start checks; give dmalloc a chance of working.
svn:r5162
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/checkSpace.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/checkSpace.pl b/contrib/checkSpace.pl
index cdbfb7907..e0b9d6b93 100755
--- a/contrib/checkSpace.pl
+++ b/contrib/checkSpace.pl
@@ -82,14 +82,15 @@ for $fn (@ARGV) {
}
}
## Warn about functions not declared at start of line.
- if ($in_func_head || ($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ &&
- ! /^(?:static )?(?:typedef|struct|union)/ &&
- ! /= *\{$/ && ! /;$/)) {
+ if ($in_func_head ||
+ ($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ &&
+ ! /^(?:static )?(?:typedef|struct|union)[^\(]*$/ &&
+ ! /= *\{$/ && ! /;$/)) {
if (/.\{$/){
print "fn() {:$fn:$.\n";
$in_func_head = 0;
- } elsif (/^\S[^\(]* +[a-zA-Z0-9_]+\(/) {
+ } elsif (/^\S[^\(]* +\**[a-zA-Z0-9_]+\(/) {
$in_func_head = -1; # started with tp fn
} elsif (/;$/) {
$in_func_head = 0;