scripts: improved the 'magic-numbers.pl' script

This commit is contained in:
Daniel Marjamäki 2011-01-06 11:30:16 +01:00
parent d1854e330b
commit 1152dc78f0
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ sub checkfile
$linenr = $linenr + 1;
# is there a magic number?
if (($line =~ /[^a-zA-Z_][0-9]{3,}/) &&
if (($line =~ /[^a-zA-Z0-9_][0-9]{3,}/) &&
(!($line =~ /define|const|(\/\/)/)))
{
print "[$filename:$linenr] Magic number\n";