summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-03-27 20:59:13 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2012-03-27 20:59:13 +0100
commit986247b74df3d8c6454f9c74c54ea1b7397286c3 (patch)
tree4fca1e722b936371de050a8450addbb8129ff97f
parent2d2df7c9e73d92713128ff717c7af8c07288781c (diff)
downloadrabbitmq-server-986247b74df3d8c6454f9c74c54ea1b7397286c3.tar.gz
cosmetic
-rw-r--r--src/rabbit_amqqueue.erl14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index 87a7e7e4..1e4e3569 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -330,20 +330,18 @@ assert_args_equivalence(#amqqueue{name = QueueName, arguments = Args},
[<<"x-expires">>, <<"x-message-ttl">>, <<"x-ha-policy">>]).
check_declare_arguments(QueueName, Args) ->
+ Checks = [{<<"x-expires">>, fun check_integer_argument/2},
+ {<<"x-message-ttl">>, fun check_integer_argument/2},
+ {<<"x-ha-policy">>, fun check_ha_policy_argument/2},
+ {<<"x-dead-letter-exchange">>, fun check_string_argument/2},
+ {<<"x-dead-letter-routing-key">>, fun check_dlxrk_argument/2}],
[case Fun(rabbit_misc:table_lookup(Args, Key), Args) of
ok -> ok;
{error, Error} -> rabbit_misc:protocol_error(
precondition_failed,
"invalid arg '~s' for ~s: ~255p",
[Key, rabbit_misc:rs(QueueName), Error])
- end ||
- {Key, Fun} <-
- [{<<"x-expires">>, fun check_integer_argument/2},
- {<<"x-message-ttl">>, fun check_integer_argument/2},
- {<<"x-ha-policy">>, fun check_ha_policy_argument/2},
- {<<"x-dead-letter-exchange">>, fun check_string_argument/2},
- {<<"x-dead-letter-routing-key">>,
- fun check_dlxrk_argument/2}]],
+ end || {Key, Fun} <- Checks],
ok.
check_string_argument(undefined, _Args) ->