summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-05-26 11:01:24 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2012-05-26 11:01:24 +0100
commit94dce0cae5cb5164b7fff0d39b38828e6647277f (patch)
tree9efdc861a7d8a7b529af4d76b5c7cb46fdbd3243 /src
parent02abe1b0afab1c46311b895061dc6fecc14637ae (diff)
downloadrabbitmq-server-git-94dce0cae5cb5164b7fff0d39b38828e6647277f.tar.gz
cosmetic(ish)
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_variable_queue.erl18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl
index dafb3f2ee7..49213c9552 100644
--- a/src/rabbit_variable_queue.erl
+++ b/src/rabbit_variable_queue.erl
@@ -1466,16 +1466,14 @@ reduce_memory_use(AlphaBetaFun, BetaDeltaFun, AckFun,
%% determined based on which is growing faster. Whichever
%% comes second may very well get a quota of 0 if the
%% first manages to push out the max number of messages.
- S1 -> {_, State2} =
- lists:foldl(fun (ReduceFun, {QuotaN, StateN}) ->
- ReduceFun(QuotaN, StateN)
- end,
- {S1, State},
- case (AvgAckIngress - AvgAckEgress) >
- (AvgIngress - AvgEgress) of
- true -> [AckFun, AlphaBetaFun];
- false -> [AlphaBetaFun, AckFun]
- end),
+ S1 -> Funs = case ((AvgAckIngress - AvgAckEgress) >
+ (AvgIngress - AvgEgress)) of
+ true -> [AckFun, AlphaBetaFun];
+ false -> [AlphaBetaFun, AckFun]
+ end,
+ {_, State2} = lists:foldl(fun (ReduceFun, {QuotaN, StateN}) ->
+ ReduceFun(QuotaN, StateN)
+ end, {S1, State}, Funs),
{true, State2}
end,