summaryrefslogtreecommitdiff
path: root/src/truncate.erl
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2015-01-27 13:05:31 +0000
committerSimon MacMullen <simon@rabbitmq.com>2015-01-27 13:05:31 +0000
commit05d9b5dbda524e492dfcef81ede5006c5d107da6 (patch)
tree5b018ce11fc87bcd690eeed9fa2c6060ac7cea46 /src/truncate.erl
parentd6453f1d044ac944eeec2b8b3196b79497b528f2 (diff)
parent0a4b964076f6a360211d36b582f1a2e9ae632490 (diff)
downloadrabbitmq-server-git-05d9b5dbda524e492dfcef81ede5006c5d107da6.tar.gz
stable to default
Diffstat (limited to 'src/truncate.erl')
-rw-r--r--src/truncate.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/truncate.erl b/src/truncate.erl
index 820af1bf86..1b4d957d0b 100644
--- a/src/truncate.erl
+++ b/src/truncate.erl
@@ -45,7 +45,7 @@ report(List, Params) when is_list(List) -> [case Item of
report(Other, Params) -> term(Other, Params).
term(Thing, {Max, {Content, Struct, ContentDec, StructDec}}) ->
- case term_limit(Thing, Max) of
+ case exceeds_size(Thing, Max) of
true -> term(Thing, true, #params{content = Content,
struct = Struct,
content_dec = ContentDec,
@@ -93,7 +93,7 @@ shrink_list([H|T], #params{content = Content,
%% sizes. This is all going to be rather approximate though, these
%% sizes are probably not very "fair" but we are just trying to see if
%% we reach a fairly arbitrary limit anyway though.
-term_limit(Thing, Max) ->
+exceeds_size(Thing, Max) ->
case term_size(Thing, Max, erlang:system_info(wordsize)) of
limit_exceeded -> true;
_ -> false