From: zacheiss Date: Fri, 11 Jun 2004 21:07:44 +0000 (+0000) Subject: Remove magic constant; always return least overallocated partition. X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/ba0feb523feb0b7c7bb335df765f2f8d2f8a6e57 Remove magic constant; always return least overallocated partition. --- diff --git a/incremental/afs/afs_utils.pl b/incremental/afs/afs_utils.pl index 57a2656e..812741f4 100644 --- a/incremental/afs/afs_utils.pl +++ b/incremental/afs/afs_utils.pl @@ -82,7 +82,7 @@ sub afs_find { local($cell,$type,$quota,@except) = @_; local($j,$k); - local(@max) = ("", "", -10000000000); + local(@max) = ("", "", undef); &afs_lock; chop(@afs_data); @@ -96,7 +96,7 @@ sub afs_find } $alloc = $used if ($alloc < $used); $j = 2*$total - $used - $alloc; - @max = ($asrv,$apart,$j) if (! @max || $j > $max[2]); + @max = ($asrv,$apart,$j) if (!$max[2] || $j > $max[2]); } &afs_unlock;