summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-29 11:03:01 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-29 11:03:01 +0900
commitcfe4f19f545538a036f9afe6f1bc35c92d8dd971 (patch)
treed38457d8872a4210f9c223d38f8bc383d3cc25d2
parent8b6e72bfad9d620c17e8e5195a002251d667d10c (diff)
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
-rw-r--r--src/lib/eina/eina_simple_xml_parser.c4
1 files changed, 1 insertions, 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
351 type = EINA_SIMPLE_XML_CDATA; 351 type = EINA_SIMPLE_XML_CDATA;
352 toff = sizeof("![CDATA[") - 1; 352 toff = sizeof("![CDATA[") - 1;
353 } 353 }
354 else if ((itr + sizeof("<!>") - 1 < itr_end) && 354 else if (itr + sizeof("<!>") - 1 < itr_end)
355 (!memcmp(itr + 2, "",
356 sizeof("") - 1)))
357 { 355 {
358 type = EINA_SIMPLE_XML_DOCTYPE_CHILD; 356 type = EINA_SIMPLE_XML_DOCTYPE_CHILD;
359 toff = sizeof("!") - 1; 357 toff = sizeof("!") - 1;