Changeset 54002


Ignore:
Timestamp:
Jul 18, 2009, 1:00:16 PM (10 years ago)
Author:
raimue@…
Message:

port1.0/portutil.tcl:
Fix a bug in check_statefile_variants, which did not work correctly if the old
set of variants has been empty.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r53860 r54002  
    16361636    upvar $variations upvariations
    16371637
     1638    array set oldvariations {}
     1639
    16381640    seek $fd 0
    16391641    while {[gets $fd line] >= 0} {
     
    16441646
    16451647    set mismatch 0
    1646     if {[array size oldvariations] > 0} {
    1647         if {[array size oldvariations] != [array size upvariations]} {
    1648             set mismatch 1
    1649         } else {
    1650             foreach key [array names upvariations *] {
    1651                 if {![info exists oldvariations($key)] || $upvariations($key) != $oldvariations($key)} {
     1648    if {[array size oldvariations] != [array size upvariations]} {
     1649        set mismatch 1
     1650    } else {
     1651        foreach key [array names upvariations *] {
     1652            if {![info exists oldvariations($key)] || $upvariations($key) != $oldvariations($key)} {
    16521653                set mismatch 1
    16531654                break
    1654                 }
    16551655            }
    16561656        }
Note: See TracChangeset for help on using the changeset viewer.