Avoid an unnecessary error test
commit3893b757323609697e9a16c51857b704f76f4ddd
authorNeil Mitchell <ndmitchell@gmail.com>
dateWed 14 Dec 2016, 21:05 (10 years ago)
parent2f89e5e
cbits/hexml.c+1−3
@@ -536,9 +536,7 @@ document* document_parse(const char* s, int slen)
536536 str content = parse_content(d);
537537 d->nodes.nodes[0].nodes = content;
538538
539− if (d->cursor < d->end && d->error_message == NULL)
540− {
539+ if (d->cursor < d->end)
541540 set_error(d, "Trailing junk at the end of the document");
542− }
543541 return d;
544542}