24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-08 21:43:07 +02:00

Fix warnings detected by Dialyzer

This commit is contained in:
Badlop 2010-11-04 01:00:18 +01:00
parent bacecae3dd
commit 659d546897
2 changed files with 6 additions and 10 deletions

View File

@ -310,12 +310,8 @@ create_captcha_x(SID, To, Lang, HeadEls, TailEls) ->
] ++ TailEls
},
Tref = erlang:send_after(?CAPTCHA_LIFETIME, ?MODULE, {remove_id, Id}),
case ets:insert(captcha, #captcha{id=Id, key=Key, tref=Tref}) of
true ->
{ok, [Captcha, Data]};
_Err ->
error
end;
ets:insert(captcha, #captcha{id=Id, key=Key, tref=Tref}),
{ok, [Captcha, Data]};
_ ->
error
end.

View File

@ -505,9 +505,7 @@ write_time({{Y,Mo,D},{H,Mi,S}}) ->
process_xdata_submit(El) ->
case exmpp_xml:get_element(El, x) of
false ->
error;
Xdata ->
#xmlel{} = Xdata ->
Fields = jlib:parse_xdata_submit(Xdata),
case catch {proplists:get_value("username", Fields),
proplists:get_value("password", Fields)} of
@ -515,7 +513,9 @@ process_xdata_submit(El) ->
{ok, User, Pass};
_ ->
error
end
end;
_ ->
error
end.
is_strong_password(Server, Password) ->