From c8fd680d9227ad474264e7c7d039fc9f1586ecbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Sat, 9 Jan 2010 16:18:59 +0000 Subject: [PATCH] Attempt to fix dialyzer warning: adhoc.erl:51: Guard test XData::'false' | #xmlel{ns::'jabber:x:data',declared_ns::[{_,_}],attrs::[{_,_,_,_}],children::'undefined' | [{_,_} | {_,_,_,_,_,_}]} =:= 'true' can never succeed SVN Revision: 2869 --- src/adhoc.erl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/adhoc.erl b/src/adhoc.erl index 1a0476c2e..52ff6e354 100644 --- a/src/adhoc.erl +++ b/src/adhoc.erl @@ -44,10 +44,11 @@ parse_request(#iq{type = set, lang = Lang, sub_el = SubEl, xmlns = ?NS_COMMANDS} Action = xml:get_tag_attr_s("action", SubEl), XData = find_xdata_el(SubEl), {xmlelement, _, _, AllEls} = SubEl, - if XData -> - Others = lists:delete(XData, AllEls); - true -> - Others = AllEls + case XData of + false -> + Others = AllEls; + _ -> + Others = lists:delete(XData, AllEls) end, #adhoc_request{lang = Lang,