fix(emqx_lwm2m_timer): Dialyzer warnings

This commit is contained in:
ayodele.akingbule 2020-11-20 14:38:13 +01:00 committed by Zaiming Shi
parent a94b70a95e
commit 8ed5dc0b78
2 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@
logger:Level("LWM2M-TIMER: " ++ Format, Args)).
cancel_timer(#timer_state{tref = TRef}) when is_reference(TRef) ->
erlang:cancel_timer(TRef), ok.
_ = erlang:cancel_timer(TRef), ok.
refresh_timer(State=#timer_state{interval = Interval, message = Msg}) ->
cancel_timer(State), start_timer(Interval, Msg).

View File

@ -86,8 +86,8 @@ stop() ->
%% ------------------------------------------------------------------
init([]) ->
ets:new(?LWM2M_OBJECT_DEF_TAB, [set, named_table, protected]),
ets:new(?LWM2M_OBJECT_NAME_TO_ID_TAB, [set, named_table, protected]),
_ = ets:new(?LWM2M_OBJECT_DEF_TAB, [set, named_table, protected]),
_ = ets:new(?LWM2M_OBJECT_NAME_TO_ID_TAB, [set, named_table, protected]),
PluginsEtcDir = emqx:get_env(plugins_etc_dir),
DefBaseDir = re:replace(PluginsEtcDir, "plugins", "lwm2m_xml", [{return, list}]),
BaseDir = application:get_env(emqx_lwm2m, xml_dir, DefBaseDir),