mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Fix cppcheck errors
This commit is contained in:
parent
f62de58632
commit
8ae8374be5
@ -37,13 +37,13 @@ NodeData::~NodeData() {};
|
|||||||
/*
|
/*
|
||||||
* XMLNodes for parsing XML into args
|
* XMLNodes for parsing XML into args
|
||||||
*/
|
*/
|
||||||
XMLNodes::XMLNodes(Transaction *transaction) {
|
XMLNodes::XMLNodes(Transaction *transaction)
|
||||||
nodes = {};
|
: nodes{},
|
||||||
node_depth = 0;
|
node_depth(0),
|
||||||
currpath = "";
|
currpath(""),
|
||||||
currval = "";
|
currval(""),
|
||||||
m_transaction = transaction;
|
m_transaction(transaction)
|
||||||
}
|
{}
|
||||||
|
|
||||||
XMLNodes::~XMLNodes() {};
|
XMLNodes::~XMLNodes() {};
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ class MSCSAXHandler {
|
|||||||
void onEndElement(void * ctx, const xmlChar *localname) {
|
void onEndElement(void * ctx, const xmlChar *localname) {
|
||||||
std::string name = reinterpret_cast<const char*>(localname);
|
std::string name = reinterpret_cast<const char*>(localname);
|
||||||
XMLNodes* xml_data = static_cast<XMLNodes*>(ctx);
|
XMLNodes* xml_data = static_cast<XMLNodes*>(ctx);
|
||||||
std::shared_ptr<NodeData>& nd = xml_data->nodes[xml_data->nodes.size()-1];
|
const std::shared_ptr<NodeData>& nd = xml_data->nodes[xml_data->nodes.size()-1];
|
||||||
if (nd->has_child == true) {
|
if (nd->has_child == true) {
|
||||||
// check the return value
|
// check the return value
|
||||||
// if it false, then stop parsing
|
// if it false, then stop parsing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user