From a2f8c31a96f4c4c739ba1797617106e2626b877c Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 19 Jan 2013 20:17:15 +0100 Subject: [PATCH] bex prun: Fixed priority inversion --- lib/bin/bex-prun | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2