xmlhandlers: Removed another unnecessary check

Fri, 15 May 2009 07:51:33 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 15 May 2009 07:51:33 +0500
changeset 1155
a93b25f1528e
parent 1154
570c0427fcb8
child 1156
14f3eb0e7787

xmlhandlers: Removed another unnecessary check

core/xmlhandlers.lua file | annotate | diff | comparison | revisions
--- a/core/xmlhandlers.lua	Fri May 15 07:27:03 2009 +0500
+++ b/core/xmlhandlers.lua	Fri May 15 07:51:33 2009 +0500
@@ -120,19 +120,17 @@
 					cb_error(session, "parse-error", "unexpected-element-close", name);
 				end
 			end
-			if stanza then
-				if #chardata > 0 then
-					-- We have some character data in the buffer
-					stanza:text(t_concat(chardata));
-					chardata = {};
-				end
-				-- Complete stanza
-				if #stanza.last_add == 0 then
-					cb_handlestanza(session, stanza);
-					stanza = nil;
-				else
-					stanza:up();
-				end
+			if #chardata > 0 then
+				-- We have some character data in the buffer
+				stanza:text(t_concat(chardata));
+				chardata = {};
+			end
+			-- Complete stanza
+			if #stanza.last_add == 0 then
+				cb_handlestanza(session, stanza);
+				stanza = nil;
+			else
+				stanza:up();
 			end
 		end
 	return xml_handlers;

mercurial