mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 17:41:52 +03:00
Cosmetics: fix some cppcheck complains to please QA
This commit is contained in:
@@ -56,8 +56,12 @@ void GeoLookup::cleanUp() {
|
||||
|
||||
bool GeoLookup::setDataBase(const std::string& filePath,
|
||||
std::string *err) {
|
||||
#ifdef WITH_MAXMIND
|
||||
std::string intMax;
|
||||
#endif
|
||||
#ifdef WITH_GEOIP
|
||||
std::string intGeo;
|
||||
#endif
|
||||
|
||||
#ifdef WITH_MAXMIND
|
||||
int status = MMDB_open(filePath.c_str(), MMDB_MODE_MMAP, &mmdb);
|
||||
@@ -85,19 +89,22 @@ bool GeoLookup::setDataBase(const std::string& filePath,
|
||||
#ifdef WITH_MAXMIND
|
||||
err->append(" libMaxMind");
|
||||
#endif
|
||||
|
||||
#ifdef WITH_GEOIP
|
||||
err->append(" GeoIP");
|
||||
#endif
|
||||
err->append(".");
|
||||
|
||||
#ifdef WITH_MAXMIND
|
||||
if (!intMax.empty()) {
|
||||
err->append(" " + intMax);
|
||||
|
||||
}
|
||||
#endif
|
||||
#ifdef WITH_GEOIP
|
||||
if (!intGeo.empty()) {
|
||||
err->append(" " + intGeo);
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ TreeNode *CPTAddElement(unsigned char *ipdata, unsigned int ip_bitmask, CPTTree
|
||||
unsigned char *buffer = NULL;
|
||||
unsigned char bitlen = 0;
|
||||
int bit_validation = 0, test_bit = 0;
|
||||
int i = 0;
|
||||
size_t i = 0;
|
||||
unsigned int x, y;
|
||||
TreeNode *node = NULL, *new_node = NULL;
|
||||
TreeNode *parent = NULL, *i_node = NULL;
|
||||
|
||||
@@ -81,7 +81,7 @@ class SharedFiles {
|
||||
{
|
||||
#ifdef MODSEC_USE_GENERAL_LOCK
|
||||
int shm_id;
|
||||
bool toBeCreated;
|
||||
bool toBeCreated(false);
|
||||
bool err = false;
|
||||
|
||||
m_memKeyStructure = ftok(".", 1);
|
||||
|
||||
Reference in New Issue
Block a user