diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-10 13:49:11 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-10 13:49:11 +0000 |
commit | 73efaa00c6044d77a6c098bec38057b231ef8243 (patch) | |
tree | 07237735ddf83c6cb011188b6c4b067bdcd6b5e3 /protocols/JabberG/src/jabber_xml.cpp | |
parent | 183f4dfbadce9c687c66e5377274a464f6c9a72f (diff) |
Jabber:
- these long static buffers replaced with CMString;
- some crazy memory allocations in chats also replaced with CMString;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@7577 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_xml.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_xml.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_xml.cpp b/protocols/JabberG/src/jabber_xml.cpp index 2060fd7273..7d4208a2cc 100644 --- a/protocols/JabberG/src/jabber_xml.cpp +++ b/protocols/JabberG/src/jabber_xml.cpp @@ -246,15 +246,15 @@ HXML __fastcall xmlGetNthChild(HXML hXml, LPCTSTR tag, int nth) {
int i, num;
- if ( !hXml || tag == NULL || _tcslen(tag) <= 0 || nth < 1)
+ if (!hXml || tag == NULL || _tcslen(tag) <= 0 || nth < 1)
return NULL;
num = 1;
for (i=0; ; i++) {
HXML n = xi.getChild(hXml, i);
- if ( !n)
+ if (!n)
break;
- if ( !lstrcmp(tag, xmlGetName(n))) {
+ if (!lstrcmp(tag, xmlGetName(n))) {
if (num == nth)
return n;
@@ -278,7 +278,7 @@ LPCTSTR __fastcall xmlGetText(HXML xml) void XPath::ProcessPath(LookupInfo &info, bool bCreate)
{
- if ( !info.nodeName) return;
+ if (!info.nodeName) return;
TCHAR *nodeName = (TCHAR *)alloca(sizeof(TCHAR) * (info.nodeName.length+1));
lstrcpyn(nodeName, info.nodeName.p, info.nodeName.length+1);
@@ -320,7 +320,7 @@ XPath::PathType XPath::LookupImpl(bool bCreate) case S_START:
{
ProcessPath(info, bCreate);
- if ( !m_hXml)
+ if (!m_hXml)
{
state = S_FINAL_ERROR;
break;
@@ -503,7 +503,7 @@ XPath::PathType XPath::LookupImpl(bool bCreate) }
}
- if ( !*p && (state < S_FINAL))
+ if (!*p && (state < S_FINAL))
{
state = S_FINAL_ERROR;
}
|