From 80fcd2eb566628e25da5190cf2cec4a477948961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Tue, 26 Aug 2008 13:00:35 +0000 Subject: [PATCH] Remove commented-out code and use proper variable names. SVN Revision: 1545 --- ChangeLog | 3 ++- src/jlib.erl | 20 ++++++++------------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc115fe9e..c011e84b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,8 @@ * src/jlib.erl: short_jid/1 and short_bare_jid/1 now produce a short JID from the user-provided JID parts. To obtain a short JID from the STRINGPREP'd parts, use the new short_prepd_jid/1 and - short_prepd_bare_jid/1 functions. + short_prepd_bare_jid/1 functions. Remove commented-out code and use + proper variable names. * src/acl.erl: Use the new short_prepd_jid/1 function from jlib. diff --git a/src/jlib.erl b/src/jlib.erl index 2268f326c..acf08a550 100644 --- a/src/jlib.erl +++ b/src/jlib.erl @@ -763,20 +763,16 @@ to_old_jid(#jid{user = Node, resource = Resource, JID#jid{user = Node1, resource = Resource1, luser = LNode1, lresource = LResource1}. -short_jid(JID1) -> - %JID1 = to_old_jid(JID), - {JID1#jid.user, JID1#jid.server, JID1#jid.resource}. +short_jid(JID) -> + {JID#jid.user, JID#jid.server, JID#jid.resource}. short_bare_jid(JID) -> - %JID1 = to_old_jid(exmpp_jid:jid_to_bare_jid(JID)), - JID1 = exmpp_jid:jid_to_bare_jid(JID), - {JID1#jid.user, JID1#jid.server, JID1#jid.resource}. + Bare_JID = exmpp_jid:jid_to_bare_jid(JID), + {Bare_JID#jid.user, Bare_JID#jid.server, Bare_JID#jid.resource}. -short_prepd_jid(JID1) -> - %JID1 = to_old_jid(JID), - {JID1#jid.luser, JID1#jid.lserver, JID1#jid.lresource}. +short_prepd_jid(JID) -> + {JID#jid.luser, JID#jid.lserver, JID#jid.lresource}. short_prepd_bare_jid(JID) -> - %JID1 = to_old_jid(exmpp_jid:jid_to_bare_jid(JID)), - JID1 = exmpp_jid:jid_to_bare_jid(JID), - {JID1#jid.luser, JID1#jid.lserver, JID1#jid.lresource}. + Bare_JID = exmpp_jid:jid_to_bare_jid(JID), + {Bare_JID#jid.luser, Bare_JID#jid.lserver, Bare_JID#jid.lresource}.