From 78895ea720e921faeccd34e0b7fda45de1b26988 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 15 May 2009 07:27:03 +0500 Subject: [PATCH] xmlhandlers: Removed an unnecessary check --- core/xmlhandlers.lua | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/core/xmlhandlers.lua b/core/xmlhandlers.lua index ed6f6a48..fc070115 100644 --- a/core/xmlhandlers.lua +++ b/core/xmlhandlers.lua @@ -14,7 +14,6 @@ local st = stanza; local tostring = tostring; local pairs = pairs; local ipairs = ipairs; -local type = type; local t_insert = table.insert; local t_concat = table.concat; @@ -62,15 +61,13 @@ function init_xmlhandlers(session, stream_callbacks) -- FIXME !!!!! for i, k in ipairs(attr) do - if type(k) == "string" then - local ns, nm = k:match("^([^|]+)|?([^|]-)$") - if ns and nm then - ns = ns_prefixes[ns]; - if ns then - attr[ns..":"..nm] = attr[k]; - attr[i] = ns..":"..nm; - attr[k] = nil; - end + local ns, nm = k:match("^([^|]+)|?([^|]-)$") + if ns and nm then + ns = ns_prefixes[ns]; + if ns then + attr[ns..":"..nm] = attr[k]; + attr[i] = ns..":"..nm; + attr[k] = nil; end end end -- 2.30.2