mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
Cleanup encoding pointer comparison
* parser.c: Compare encoding pointer with a NULL instead of xmlCharEncoding enum value 0 then casted to char * !
This commit is contained in:
committed by
Daniel Veillard
parent
8ad2930f62
commit
e6ad10a5b9
4
parser.c
4
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
|
||||
|
||||
Reference in New Issue
Block a user