@@ -55,13 +55,14 @@ sub check_source {
5555 push @{$troubles -> {unwanted_strcmp }}, $lineno if $file =~ / ^src\/ .*\. c$ / && $l =~ / \b strcmp\s *\( / ;
5656 push @{$troubles -> {unwanted_clock }}, $lineno if $file =~ / ^src\/ .*\. c$ / && $l =~ / \b clock\s *\( / ;
5757 push @{$troubles -> {unwanted_qsort }}, $lineno if $file =~ / ^src\/ .*\. c$ / && $l =~ / \b qsort\s *\( / ;
58+ push @{$troubles -> {sizeof_no_brackets }}, $lineno if $file =~ / ^src\/ .*\. c$ / && $l =~ / \b sizeof\s *[^\( ]/ ;
5859 if ($file =~ m | src/.*\. c$ | &&
5960 $file !~ m | src/ciphers/.*\. c$ | &&
6061 $file !~ m | src/hashes/.*\. c$ | &&
6162 $file !~ m | src/math/.+_desc.c$ | &&
6263 $file !~ m | src/stream/sober128/sober128_stream.c$ | &&
63- $l =~ / ^static\s +\S +\s +([^_][a-zA-Z0-9_]+)\s *\( / ) {
64- push @{$troubles -> {staticfunc_name }}, " $lineno ($1 )" ;
64+ $l =~ / ^static( \s +[a-zA-Z0-9_]+) +\s +([^_][a-zA-Z0-9_]+)\s *\( / ) {
65+ push @{$troubles -> {staticfunc_name }}, " $lineno ($2 )" ;
6566 }
6667 $lineno ++;
6768 }
@@ -277,7 +278,7 @@ sub patch_file {
277278sub version_from_tomcrypt_h {
278279 my $h = read_file(shift );
279280 if ($h =~ / \n #define\s *SCRYPT\s *"([0-9]+)\. ([0-9]+)\. ([0-9]+)(.*)"/s ) {
280- return " VERSION_PC=$1 .$2 .$3 " , " VERSION_LT=1:0 " , " VERSION=$1 .$2 .$3$4 " , " PROJECT_NUMBER=$1 .$2 .$3$4 " ;
281+ return " VERSION_PC=$1 .$2 .$3 " , " VERSION_LT=1:1 " , " VERSION=$1 .$2 .$3$4 " , " PROJECT_NUMBER=$1 .$2 .$3$4 " ;
281282 }
282283 else {
283284 die " #define SCRYPT not found in tomcrypt.h" ;
0 commit comments