]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'maint-0.2.9' into maint-0.3.1 maint-0.3.1
authorNick Mathewson <nickm@torproject.org>
Sat, 30 Jun 2018 03:11:47 +0000 (23:11 -0400)
committerNick Mathewson <nickm@torproject.org>
Sat, 30 Jun 2018 03:11:47 +0000 (23:11 -0400)
1  2 
scripts/maint/checkSpace.pl

index 6d19d6ccde3891b45279605f0e11f2257d428cb2,5af95a27e5b9e7dcc5c80af165e27e2565d34312..3043eb1aaf8a41f71476a83eeed8625e1826f5d1
@@@ -168,32 -157,25 +168,27 @@@ for my $fn (@ARGV) 
                  }
              }
  
 -          ## Check for forbidden functions except when they are
 -          # explicitly permitted
 -          if (/\bassert\(/ && not /assert OK/) {
 -              print "assert :$fn:$.   (use tor_assert)\n";
 -          }
 -          if (/\bmemcmp\(/ && not /memcmp OK/) {
 -              print "memcmp :$fn:$.   (use {tor,fast}_mem{eq,neq,cmp}\n";
 -          }
 -          # always forbidden.
 -          if (not / OVERRIDE /) {
 -              if (/\bstrcat\(/ or /\bstrcpy\(/ or /\bsprintf\(/) {
 -                  print "$& :$fn:$.\n";
 -              }
 -              if (/\bmalloc\(/ or /\bfree\(/ or /\brealloc\(/ or
 -                  /\bstrdup\(/ or /\bstrndup\(/ or /\bcalloc\(/) {
 -                  print "$& :$fn:$.    (use tor_malloc, tor_free, etc)\n";
 -              }
 -          }
 +            ## Check for forbidden functions except when they are
 +            # explicitly permitted
 +            if (/\bassert\(/ && not /assert OK/) {
 +                msg "assert :$fn:$.   (use tor_assert)\n";
 +            }
 +            if (/\bmemcmp\(/ && not /memcmp OK/) {
 +                msg "memcmp :$fn:$.   (use {tor,fast}_mem{eq,neq,cmp}\n";
 +            }
 +            # always forbidden.
 +            if (not /\ OVERRIDE\ /) {
 +                if (/\bstrcat\(/ or /\bstrcpy\(/ or /\bsprintf\(/) {
 +                    msg "$& :$fn:$.\n";
 +                }
 +                if (/\bmalloc\(/ or /\bfree\(/ or /\brealloc\(/ or
 +                    /\bstrdup\(/ or /\bstrndup\(/ or /\bcalloc\(/) {
 +                    msg "$& :$fn:$.    (use tor_malloc, tor_free, etc)\n";
 +                }
 +            }
          }
      }
-     ## Warn if the file doesn't end with a blank line.
-     #    (End each file with a single blank line.)
-     if (! $lastnil) {
-         msg "  EOL\@EOF:$fn:$.\n";
-     }
      close(F);
  }
 +
 +exit $found;