summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_agent.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-20 18:37:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-20 18:37:03 +0000
commit4ad5767f652e0ffd3ebf7df8d8f62a682277faa1 (patch)
tree009f4d4267d0d4e451b74140125b5816701860fb /protocols/JabberG/src/jabber_agent.cpp
parent8761e793032de3e266a0cb9582327367c6172467 (diff)
- numerous fixes for ineffective xmlGetText() calls;
- common picture type detection code extracted to the separate function; - code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@5431 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_agent.cpp')
-rw-r--r--protocols/JabberG/src/jabber_agent.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_agent.cpp b/protocols/JabberG/src/jabber_agent.cpp
index 39ec5f7872..c448cee0c7 100644
--- a/protocols/JabberG/src/jabber_agent.cpp
+++ b/protocols/JabberG/src/jabber_agent.cpp
@@ -79,7 +79,7 @@ class CAgentRegDlg : public CJabberDlgBase
int m_formHeight, m_frameHeight;
RECT m_frameRect;
HXML m_agentRegIqNode;
- TCHAR* m_jid;
+ TCHAR *m_jid;
CCtrlButton m_submit;
@@ -152,9 +152,8 @@ public:
if ((xNode=xmlGetChild(queryNode , "x")) != NULL) {
// use new jabber:x:data form
- HXML n = xmlGetChild(xNode , "instructions");
- if (n != NULL && xmlGetText(n)!=NULL)
- JabberFormSetInstruction(m_hwnd, xmlGetText(n));
+ if (LPCTSTR ptszInstr = xmlGetText( xmlGetChild(xNode, "instructions")))
+ JabberFormSetInstruction(m_hwnd, ptszInstr);
JabberFormCreateUI(hFrame, xNode, &m_formHeight /*dummy*/);
}
@@ -163,7 +162,7 @@ public:
HJFORMLAYOUT layout_info = JabberFormCreateLayout(hFrame);
for (int i=0; ; i++) {
HXML n = xmlGetChild(queryNode ,i);
- if ( !n)
+ if (n == NULL)
break;
if (xmlGetName(n)) {