diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-07-29 11:03:01 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-07-29 11:03:01 +0900 |
commit | cfe4f19f545538a036f9afe6f1bc35c92d8dd971 (patch) | |
tree | d38457d8872a4210f9c223d38f8bc383d3cc25d2 | |
parent | 8b6e72bfad9d620c17e8e5195a002251d667d10c (diff) | |
download | efl-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.c | 4 |
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; |