Adrian Mouat pointed out redundancies in xmlReportError() Daniel

* error.c: Adrian Mouat pointed out redundancies in xmlReportError()
Daniel
This commit is contained in:
Daniel Veillard 2005-09-27 09:20:07 +00:00
parent 5de0938fd1
commit d070d3ca68
2 changed files with 4 additions and 8 deletions

View File

@ -1,3 +1,7 @@
Tue Sep 27 11:20:57 CEST 2005 Daniel Veillard <daniel@veillard.com>
* error.c: Adrian Mouat pointed out redundancies in xmlReportError()
Mon Sep 26 19:18:24 CEST 2005 Daniel Veillard <daniel@veillard.com>
* xmlregexp.c: seems a test to avoid duplicate transition is

View File

@ -293,8 +293,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
if (name != NULL) {
channel(data, "element %s: ", name);
}
if (code == XML_ERR_OK)
return;
switch (domain) {
case XML_FROM_PARSER:
channel(data, "parser ");
@ -360,8 +358,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
default:
break;
}
if (code == XML_ERR_OK)
return;
switch (level) {
case XML_ERR_NONE:
channel(data, ": ");
@ -376,8 +372,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
channel(data, "error : ");
break;
}
if (code == XML_ERR_OK)
return;
if (str != NULL) {
int len;
len = xmlStrlen((const xmlChar *)str);
@ -388,8 +382,6 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
} else {
channel(data, "%s\n", "out of memory error");
}
if (code == XML_ERR_OK)
return;
if (ctxt != NULL) {
xmlParserPrintFileContextInternal(input, channel, data);