mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +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::XMLNodes(Transaction *transaction) {
|
||||
nodes = {};
|
||||
node_depth = 0;
|
||||
currpath = "";
|
||||
currval = "";
|
||||
m_transaction = transaction;
|
||||
}
|
||||
XMLNodes::XMLNodes(Transaction *transaction)
|
||||
: nodes{},
|
||||
node_depth(0),
|
||||
currpath(""),
|
||||
currval(""),
|
||||
m_transaction(transaction)
|
||||
{}
|
||||
|
||||
XMLNodes::~XMLNodes() {};
|
||||
|
||||
@ -76,7 +76,7 @@ class MSCSAXHandler {
|
||||
void onEndElement(void * ctx, const xmlChar *localname) {
|
||||
std::string name = reinterpret_cast<const char*>(localname);
|
||||
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) {
|
||||
// check the return value
|
||||
// if it false, then stop parsing
|
||||
|
Loading…
x
Reference in New Issue
Block a user