Changeset 743


Ignore:
Timestamp:
06/11/15 17:18:44 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Shuffle a variable name for clarity and declaration location for scope.
Scope change seems to have been rendered unnecessary by other changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/IPDB.pm

    r742 r743  
    20592059
    20602060  my @ret;
     2061  my @newfreelist;
    20612062  eval {
    20622063    $dbh->do("UPDATE allocations SET cidr = ? WHERE id = ?", undef, $newblock, $id);
     
    20642065    # find the netblock(s) that are now free
    20652066    my @workingblocks = $oldblock->split($newblock->masklen);
    2066     my @wb2;
    20672067    foreach my $newsub (@workingblocks) {
    20682068      next if $newsub == $newblock;
    2069       push @wb2, $newsub;
    2070     }
    2071     @wb2 = Compact(@wb2);
     2069      push @newfreelist, $newsub;
     2070    }
     2071    @newfreelist = Compact(@newfreelist);
    20722072
    20732073    # set new freeblocks, and clean up any IP pool entries if needed.
    2074     foreach my $newfree (@wb2) {
     2074    foreach my $newfree (@newfreelist) {
    20752075      my @clist;
    20762076      # the block we're munging
     
    20932093      }
    20942094
    2095     } # $newfree (@wb2)
     2095    } # $newfree (@newfreelist)
    20962096
    20972097    # additional cleanup on net/gw/bcast IPs in pool
Note: See TracChangeset for help on using the changeset viewer.