Skip to content
Permalink
Browse files
Fix division by zero on usage/2 call
This always used integers, but with the new unit setting for
recon_alloc, it is now possible to get floating point values in there.

This makes the call handle them.
  • Loading branch information
ferd committed Nov 21, 2013
1 parent 4cf5208 commit 5c58e506457251a96450baf24eca834bb9eebb56
Showing 1 changed file with 1 addition and 0 deletions.
@@ -564,6 +564,7 @@ weighed_values({SbcsBlockSize, SbcsCarrierSize},
%% but also takes 0/0 to be 100% to make working with sorting and
%% weights simpler.
usage(0,0) -> 1.00;
usage(0.0,0.0) -> 1.00;
%usage(N,0) -> ???;
usage(Block,Carrier) -> Block/Carrier.

0 comments on commit 5c58e50

Please sign in to comment.