summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Sivov <bunglehead@gmail.com>2010-11-01 10:35:14 (GMT)
committerDaniel Veillard <veillard@redhat.com>2010-11-01 10:35:14 (GMT)
commite6ad10a5b9709d26b0988c258783835d063a3b08 (patch)
tree5ef8a14b9111cef67b106ce2f84fff5a3060f432
parent8ad2930f623f0cc3af2d006a734b4e31d3f6b963 (diff)
downloadlibxml2-e6ad10a5b9709d26b0988c258783835d063a3b08.tar.gz
libxml2-e6ad10a5b9709d26b0988c258783835d063a3b08.tar.xz
Cleanup encoding pointer comparison
* parser.c: Compare encoding pointer with a NULL instead of xmlCharEncoding enum value 0 then casted to char * !
-rw-r--r--parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parser.c b/parser.c
index 1db706b..e8cd123 100644
--- a/parser.c
+++ b/parser.c
@@ -6609,7 +6609,7 @@ xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID,
xmlDetectSAX2(ctxt);
GROW;
- if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) &&
+ if ((ctxt->encoding == NULL) &&
(ctxt->input->end - ctxt->input->cur >= 4)) {
xmlChar start[4];
xmlCharEncoding enc;
@@ -10105,7 +10105,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator);
- if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) &&
+ if ((ctxt->encoding == NULL) &&
((ctxt->input->end - ctxt->input->cur) >= 4)) {
/*
* Get the 4 first bytes and decode the charset