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)
downloadefl-cfe4f19f545538a036f9afe6f1bc35c92d8dd971.tar.gz
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
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;