From: Martin Mares Date: Sat, 19 Jan 2013 19:17:15 +0000 (+0100) Subject: bex prun: Fixed priority inversion X-Git-Tag: v3.1~3 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=a2f8c31a96f4c4c739ba1797617106e2626b877c;p=bex.git bex prun: Fixed priority inversion --- diff --git a/lib/bin/bex-prun b/lib/bin/bex-prun index 755595c..0fd8c87 100755 --- a/lib/bin/bex-prun +++ b/lib/bin/bex-prun @@ -266,7 +266,7 @@ sub place_slot($) { my $pri = $state_to_pri{$host_state{$s->{'Host'}}}; my ($best, $besti); - my $bestpri = -1; + my $bestpri = 99; for my $i (0..$nrows-1) { my $r = $by_row[$i]; if (!defined $r) { @@ -280,7 +280,7 @@ sub place_slot($) { if ($rpri < $bestpri || $rpri == $bestpri && $r->{'LastUpdate'} < $best->{'LastUpdate'}) { - # Trick: $best must be defined, as otherwise $bestpri == -1 + # Trick: $best must be defined, as otherwise $bestpri == 99 $best = $r; $besti = $i; $bestpri = $rpri;