mirror of
https://github.com/openappsec/openappsec.git
synced 2025-06-28 16:41:02 +03:00
Fix constness
This commit is contained in:
parent
4084cb4f6d
commit
2da3dc4052
@ -206,7 +206,7 @@ ParserHTML::~ParserHTML()
|
||||
}
|
||||
|
||||
bool
|
||||
ParserHTML::filterErrors(xmlErrorPtr xmlError)
|
||||
ParserHTML::filterErrors(const xmlError *xmlError)
|
||||
{
|
||||
dbgDebug(D_WAAP_PARSER_HTML)
|
||||
<< "ParserHTML::filterErrors(): xmlError "
|
||||
@ -245,7 +245,7 @@ ParserHTML::push(const char *data, size_t data_len)
|
||||
// Send zero-length chunk with "terminate" flag enabled to signify end-of-stream
|
||||
|
||||
if (htmlParseChunk(m_pushParserCtxPtr, m_buf, 0, 1)) {
|
||||
xmlErrorPtr xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||
auto xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||
if (xmlError && filterErrors(xmlError)) {
|
||||
dbgDebug(D_WAAP_PARSER_HTML)
|
||||
<< "ParserHTML::push(): xmlError: code="
|
||||
@ -320,7 +320,7 @@ ParserHTML::push(const char *data, size_t data_len)
|
||||
<< i;
|
||||
if (m_pushParserCtxPtr) {
|
||||
if (htmlParseChunk(m_pushParserCtxPtr, data + i, data_len - i, 0)) {
|
||||
xmlErrorPtr xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||
auto xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||
if (xmlError && filterErrors(xmlError)) {
|
||||
dbgDebug(D_WAAP_PARSER_HTML)
|
||||
<< "ParserHTML::push(): xmlError: code="
|
||||
|
@ -68,7 +68,7 @@ private:
|
||||
|
||||
// Filter out errors that should be ignored. Returns true if error should be treated,
|
||||
// false if an error should be ignored
|
||||
bool filterErrors(xmlErrorPtr xmlError);
|
||||
bool filterErrors(const xmlError *xmlError);
|
||||
|
||||
IParserStreamReceiver &m_receiver;
|
||||
enum state m_state;
|
||||
|
@ -234,7 +234,7 @@ ParserXML::~ParserXML() {
|
||||
}
|
||||
}
|
||||
|
||||
bool ParserXML::filterErrors(xmlErrorPtr xmlError) {
|
||||
bool ParserXML::filterErrors(const xmlError *xmlError) {
|
||||
dbgDebug(D_WAAP_PARSER_XML) << "ParserXML::filterErrors(): xmlError " << xmlError->code << ": '" <<
|
||||
xmlError->message << "'";
|
||||
|
||||
@ -262,7 +262,7 @@ size_t ParserXML::push(const char* data, size_t data_len) {
|
||||
// Send zero-length chunk with "terminate" flag enabled to signify end-of-stream
|
||||
|
||||
if (xmlParseChunk(m_pushParserCtxPtr, m_buf, 0, 1)) {
|
||||
xmlErrorPtr xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||
auto xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||
if (xmlError && filterErrors(xmlError)) {
|
||||
dbgDebug(D_WAAP_PARSER_XML) << "ParserXML::push(): xmlError: code=" << xmlError->code << ": '" <<
|
||||
xmlError->message << "'";
|
||||
@ -316,7 +316,7 @@ size_t ParserXML::push(const char* data, size_t data_len) {
|
||||
": '" << std::string(data + i, data_len - i) << "'; i=" << i;
|
||||
if (m_pushParserCtxPtr) {
|
||||
if (xmlParseChunk(m_pushParserCtxPtr, data + i, data_len - i, 0)) {
|
||||
xmlErrorPtr xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||
auto xmlError = xmlCtxtGetLastError(m_pushParserCtxPtr);
|
||||
if (xmlError && filterErrors(xmlError)) {
|
||||
dbgDebug(D_WAAP_PARSER_XML) << "ParserXML::push(): xmlError: code=" << xmlError->code <<
|
||||
": '" << xmlError->message << "'";
|
||||
|
@ -83,7 +83,7 @@ private:
|
||||
|
||||
// Filter out errors that should be ignored. Returns true if error should be treated,
|
||||
// false if an error should be ignored
|
||||
bool filterErrors(xmlErrorPtr xmlError);
|
||||
bool filterErrors(const xmlError *xmlError);
|
||||
|
||||
IParserStreamReceiver &m_receiver;
|
||||
enum state m_state;
|
||||
|
Loading…
x
Reference in New Issue
Block a user