Skip to content

Commit fcebf36

Browse files
deadtrickstermergify[bot]
authored andcommitted
Use application:get_env/3
(cherry picked from commit 728dd57)
1 parent 409061a commit fcebf36

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
@@ -1221,12 +1221,9 @@ get_proc_name() ->
12211221
{ok, Name}
12221222
end.
12231223

1224-
%% application:get_env/3 is only available in R16B01 or later.
1224+
%% application:get_env/3 is available in R16B01 or later.
12251225
get_env(Application, Key, Def) ->
1226-
case application:get_env(Application, Key) of
1227-
{ok, Val} -> Val;
1228-
undefined -> Def
1229-
end.
1226+
application:get_env(Application, Key, Def).
12301227

12311228
get_channel_operation_timeout() ->
12321229
%% Default channel_operation_timeout set to net_ticktime + 10s to

0 commit comments

Comments
 (0)