mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-04-24 18:50:07 +03:00
parser: Remove useless ent->etype test in xmlParseReference
If ent->etype is invalid, ret can't equal XML_ERR_OK.
This commit is contained in:
parent
7ee7f0360a
commit
ec6633afae
6
parser.c
6
parser.c
@ -7271,8 +7271,6 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
|
||||
}
|
||||
|
||||
if ((ret == XML_ERR_OK) && (list != NULL)) {
|
||||
if ((ent->etype == XML_INTERNAL_GENERAL_ENTITY) ||
|
||||
(ent->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) {
|
||||
ent->children = list;
|
||||
/*
|
||||
* Prune it directly in the generated document
|
||||
@ -7307,10 +7305,6 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
|
||||
xmlAddEntityReference(ent, list, NULL);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
}
|
||||
} else {
|
||||
xmlFreeNodeList(list);
|
||||
list = NULL;
|
||||
}
|
||||
} else if ((ret != XML_ERR_OK) &&
|
||||
(ret != XML_WAR_UNDECLARED_ENTITY)) {
|
||||
xmlFatalErrMsgStr(ctxt, XML_ERR_UNDECLARED_ENTITY,
|
||||
|
Loading…
x
Reference in New Issue
Block a user