]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix a Perl warning about useless use of a constant in void context.
authorSimon Tatham <anakin@pobox.com>
Mon, 16 Apr 2012 18:21:31 +0000 (18:21 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 16 Apr 2012 18:21:31 +0000 (18:21 +0000)
[originally from svn r9458]

contrib/logparse.pl

index 4d9361204888d91d9ba04e20cd9b316d33f919d5..29043baee05800ce3cf6a473b4b790223574e89f 100755 (executable)
@@ -490,7 +490,8 @@ if ($dumpchannels) {
                       'halfclosed'=>2, 'open'=>3, 'halfopen'=>4);
     for my $index (0..$#channels) {
         my $chan = $channels[$index];
-        my $so = $stateorder{$chan->{'state'}} or 1000; # unknown sorts highest
+        my $so = $stateorder{$chan->{'state'}};
+        $so = 1000 unless defined $so; # any state I've missed above comes last
         $chan->{'index'} = sprintf "ch%d", $index;
         $chan->{'order'} = sprintf "%08d %08d", $so, $index;
     }