summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-28 15:23:46 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-28 15:23:46 +0300
commit2cb551c95b03612f9dd680504d30bc1d18ea31ac (patch)
treee24d0a6a9b799a75aefdee58b5b3d2369be8d461 /protocols/JabberG
parent457d7cc7cd21de3000e0a58e4a2e4c278f6032b8 (diff)
code cleaning / warning fixes
Diffstat (limited to 'protocols/JabberG')
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 1b3d83c291..293da198d5 100755
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -1084,15 +1084,14 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info)
if (!m_bEnableCarbons)
return;
- const TiXmlElement *forwarded = nullptr;
- const TiXmlElement *message = nullptr;
+ auto *xmlForwarded = XmlGetChildByTag(carbon, "forwarded", "xmlns", JABBER_XMLNS_FORWARD);
+ auto *xmlMessage = XmlFirstChild(xmlForwarded, "message");
// Carbons MUST have forwarded/message content
- if (!(forwarded = XmlGetChildByTag(carbon, "forwarded", "xmlns", JABBER_XMLNS_FORWARD))
- || !(message = XmlFirstChild(forwarded, "message")))
+ if (xmlMessage == nullptr)
return;
// Unwrap the carbon in any case
- node = message;
+ node = xmlMessage;
type = XmlGetAttr(node, "type");
if (!carbonSent) {