on master help sign in
Avoid an unnecessary error test
3893b75Neil Mitchell
cbits/hexml.c+1−3
@@ -536,9 +536,7 @@ document* document_parse(const char* s, int slen)
536 str content = parse_content(d);
536 str content = parse_content(d);
537 d->nodes.nodes[0].nodes = content;
537 d->nodes.nodes[0].nodes = content;
538
538
539− if (d->cursor < d->end && d->error_message == NULL)
539+ if (d->cursor < d->end)
540− {
541 set_error(d, "Trailing junk at the end of the document");
540 set_error(d, "Trailing junk at the end of the document");
542− }
543 return d;
541 return d;
544}
542}