summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2014-01-22 15:21:28 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2014-01-22 15:21:28 +0000
commit016f3c221dbc23b0e9cf8dc7062cbe279d38fb05 (patch)
tree27b593cd0422bb76f1ed2908682eb2e75b8995e8
parentdb049dff1b47f001b77cac4e7e9e8554a65c66e1 (diff)
downloadrabbitmq-server-016f3c221dbc23b0e9cf8dc7062cbe279d38fb05.tar.gz
refactor: genericise
-rw-r--r--src/rabbit_amqqueue.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index 4a6789e3..8ec29f11 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -425,7 +425,7 @@ declare_args() ->
[{<<"x-expires">>, fun check_expires_arg/2},
{<<"x-message-ttl">>, fun check_message_ttl_arg/2},
{<<"x-dead-letter-routing-key">>, fun check_dlxrk_arg/2},
- {<<"x-max-length">>, fun check_max_length_arg/2}].
+ {<<"x-max-length">>, fun check_non_neg_int_arg/2}].
consume_args() -> [{<<"x-priority">>, fun check_int_arg/2}].
@@ -435,7 +435,7 @@ check_int_arg({Type, _}, _) ->
false -> {error, {unacceptable_type, Type}}
end.
-check_max_length_arg({Type, Val}, Args) ->
+check_non_neg_int_arg({Type, Val}, Args) ->
case check_int_arg({Type, Val}, Args) of
ok when Val >= 0 -> ok;
ok -> {error, {value_negative, Val}};