Changeset

4445:0434eb77d18c

migrator/jabberd14: Minor refactoring.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 09 Dec 2011 11:37:30 +0500
parents 4444:498eaeff6a05
children 4446:d1d4d8c8a2a9
files tools/migration/migrator/jabberd14.lua
diffstat 1 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tools/migration/migrator/jabberd14.lua	Thu Dec 08 07:41:28 2011 +0000
+++ b/tools/migration/migrator/jabberd14.lua	Fri Dec 09 11:37:30 2011 +0500
@@ -67,15 +67,12 @@
 end)();
 
 local function load_xml(path)
-	if path then
-		local f, err = io_open(path);
-		if not f then return f, err; end
-		local data = f:read("*a");
-		f:close();
-		if data then
-			return parse_xml(data);
-		end
-	end
+	local f, err = io_open(path);
+	if not f then return f, err; end
+	local data = f:read("*a");
+	f:close();
+	if not data then return; end
+	return parse_xml(data);
 end
 
 local function load_spool_file(host, filename, path)