summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_amqqueue.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl
index 9c08997310..51f5bfeafa 100644
--- a/src/rabbit_amqqueue.erl
+++ b/src/rabbit_amqqueue.erl
@@ -413,8 +413,9 @@ check_int_arg({Type, _}, _) ->
check_maxdepth_arg({Type, Val}, Args) ->
case check_int_arg({Type, Val}, Args) of
- ok when Val =< 0 -> {error, {value_non_positive, Val}};
- X -> X
+ ok when Val > 0 -> ok;
+ ok -> {error, {value_not_positive, Val}};
+ Error -> Error
end.
check_expires_arg({Type, Val}, Args) ->