From 2cb551c95b03612f9dd680504d30bc1d18ea31ac Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 28 Feb 2019 15:23:46 +0300 Subject: code cleaning / warning fixes --- protocols/JabberG/src/jabber_thread.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'protocols/JabberG/src') 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) { -- cgit v1.2.3