Skip to content

Commit 728dd57

Browse files
committed
Use application:get_env/3
1 parent 4eda2a8 commit 728dd57

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

deps/rabbit_common/src/rabbit_misc.erl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,12 +1180,9 @@ get_proc_name() ->
11801180
{ok, Name}
11811181
end.
11821182

1183-
%% application:get_env/3 is only available in R16B01 or later.
1183+
%% application:get_env/3 is available in R16B01 or later.
11841184
get_env(Application, Key, Def) ->
1185-
case application:get_env(Application, Key) of
1186-
{ok, Val} -> Val;
1187-
undefined -> Def
1188-
end.
1185+
application:get_env(Application, Key, Def).
11891186

11901187
get_channel_operation_timeout() ->
11911188
%% Default channel_operation_timeout set to net_ticktime + 10s to

0 commit comments

Comments
 (0)