Print this page
11506 smatch resync

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/smatch_data/db/init_constraints.pl
          +++ new/usr/src/tools/smatch/src/smatch_data/db/init_constraints.pl
↓ open down ↓ 38 lines elided ↑ open up ↑
  39   39      $db->do("PRAGMA temp_store = MEMORY");
  40   40      $db->do("PRAGMA locking = EXCLUSIVE");
  41   41  }
  42   42  
  43   43  sub load_manual_constraints($$)
  44   44  {
  45   45      my $full_path = shift;
  46   46      my $project = shift;
  47   47      my $dir = dirname($full_path);
  48   48  
       49 +    if ($project =~ /^$/) {
       50 +        return;
       51 +    }
       52 +
  49   53      open(FILE, "$dir/$project.constraints");
  50   54      while (<FILE>) {
  51   55          s/\n//;
  52   56          $db->do("insert or ignore into constraints (str) values ('$_')");
  53   57      }
  54   58      close(FILE);
  55   59  
  56   60      open(FILE, "$dir/$project.constraints_required");
  57   61      while (<FILE>) {
  58   62          my $limit;
↓ open down ↓ 21 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX