Permalink
Browse files

__xmlRaiseError: do cheap code check early

if error code is XML_ERR_OK return immediately
  • Loading branch information...
1 parent c794eb5 commit 111d705c282e03e7202723c6c7e4499f8582bd4f @ldv-alt ldv-alt committed with veillard Feb 23, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 error.c
View
4 error.c
@@ -452,6 +452,8 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
xmlErrorPtr to = &xmlLastError;
xmlNodePtr baseptr = NULL;
+ if (code == XML_ERR_OK)
+ return;
if ((xmlGetWarningsDefaultValue == 0) && (level == XML_ERR_WARNING))
return;
if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||
@@ -481,8 +483,6 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
(ctxt->sax->initialized == XML_SAX2_MAGIC))
schannel = ctxt->sax->serror;
}
- if (code == XML_ERR_OK)
- return;
/*
* Formatting the message
*/

0 comments on commit 111d705

Please sign in to comment.