mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-28 07:21:26 +03:00
parser: Simplify xmlParseConditionalSections
This commit is contained in:
parent
3582b07bd2
commit
e4f56a7213
14
parser.c
14
parser.c
@ -6816,8 +6816,6 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
||||
inputIds[depth] = id;
|
||||
depth++;
|
||||
} else if (CMP6(CUR_PTR, 'I', 'G', 'N', 'O', 'R', 'E')) {
|
||||
int state;
|
||||
xmlParserInputState instate;
|
||||
size_t ignoreDepth = 0;
|
||||
|
||||
SKIP(6);
|
||||
@ -6834,15 +6832,6 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
||||
}
|
||||
NEXT;
|
||||
|
||||
/*
|
||||
* Parse up to the end of the conditional section but disable
|
||||
* SAX event generating DTD building in the meantime
|
||||
*/
|
||||
state = ctxt->disableSAX;
|
||||
instate = ctxt->instate;
|
||||
if (ctxt->recovery == 0) ctxt->disableSAX = 1;
|
||||
ctxt->instate = XML_PARSER_IGNORE;
|
||||
|
||||
while (RAW != 0) {
|
||||
if ((RAW == '<') && (NXT(1) == '!') && (NXT(2) == '[')) {
|
||||
SKIP(3);
|
||||
@ -6863,9 +6852,6 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
||||
}
|
||||
}
|
||||
|
||||
ctxt->disableSAX = state;
|
||||
ctxt->instate = instate;
|
||||
|
||||
if (RAW == 0) {
|
||||
xmlFatalErr(ctxt, XML_ERR_CONDSEC_NOT_FINISHED, NULL);
|
||||
goto error;
|
||||
|
Loading…
Reference in New Issue
Block a user