diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-09-30 01:39:24 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-09-30 01:39:24 +0000 |
commit | 26e7a05725bcb2cea59401803371ee3fa688a8f6 (patch) | |
tree | b81d9d8ee4672297b78012cecd17142616b2944e /contrib | |
parent | edd15cb781934d91ae92adbe3311bf339ddbf2e8 (diff) | |
download | tor-26e7a05725bcb2cea59401803371ee3fa688a8f6.tar.gz tor-26e7a05725bcb2cea59401803371ee3fa688a8f6.zip |
even better function start checks; give dmalloc a chance of working.
svn:r5162
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/checkSpace.pl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/checkSpace.pl b/contrib/checkSpace.pl index cdbfb79077..e0b9d6b93b 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; |