From cfe4f19f545538a036f9afe6f1bc35c92d8dd971 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sat, 29 Jul 2017 11:03:01 +0900 Subject: [PATCH] eina simple xml parser - remove pointless memcmp of 0 bytes no point - all we are doing is having a final fallback of any tag that starts with ! that isnt a special one like !DOCTYPE, !-- comment and ![CDATA stuff... analysers dont like these pointless calls. found by PVS studio --- src/lib/eina/eina_simple_xml_parser.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/eina/eina_simple_xml_parser.c b/src/lib/eina/eina_simple_xml_parser.c index ad0ce62106..93e1416221 100644 --- a/src/lib/eina/eina_simple_xml_parser.c +++ b/src/lib/eina/eina_simple_xml_parser.c @@ -351,9 +351,7 @@ eina_simple_xml_parse(const char *buf, unsigned buflen, Eina_Bool strip, Eina_Si type = EINA_SIMPLE_XML_CDATA; toff = sizeof("![CDATA[") - 1; } - else if ((itr + sizeof("") - 1 < itr_end) && - (!memcmp(itr + 2, "", - sizeof("") - 1))) + else if (itr + sizeof("") - 1 < itr_end) { type = EINA_SIMPLE_XML_DOCTYPE_CHILD; toff = sizeof("!") - 1;