mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Code cosmetics: reduce the amount of cppcheck warnings
This commit is contained in:
@@ -80,10 +80,9 @@ IpTree::~IpTree() {
|
||||
|
||||
bool IpTree::addFromBuffer(std::istream *ss, std::string *error) {
|
||||
char *error_msg = NULL;
|
||||
int res = 0;
|
||||
|
||||
for (std::string line; std::getline(*ss, line); ) {
|
||||
res = ip_tree_from_param(line.c_str(), &m_tree, &error_msg);
|
||||
int res = ip_tree_from_param(line.c_str(), &m_tree, &error_msg);
|
||||
if (res != 0) {
|
||||
if (error_msg != NULL) {
|
||||
error->assign(error_msg);
|
||||
|
@@ -354,7 +354,7 @@ std::ostream& operator<<(std::ostream& out, MD5 md5)
|
||||
|
||||
//////////////////////////////
|
||||
|
||||
std::string md5(const std::string str)
|
||||
std::string md5(const std::string& str)
|
||||
{
|
||||
MD5 md5 = MD5(str);
|
||||
|
||||
|
@@ -88,6 +88,6 @@ private:
|
||||
static inline void II(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac);
|
||||
};
|
||||
|
||||
std::string md5(const std::string str);
|
||||
std::string md5(const std::string& str);
|
||||
|
||||
#endif
|
@@ -53,7 +53,6 @@ int regex_search(const std::string& s, SMatch *match,
|
||||
}
|
||||
|
||||
int regex_search(const std::string& s, Regex regex) {
|
||||
std::string match;
|
||||
pcrecpp::RE re(regex.pattern);
|
||||
return re.PartialMatch(s);
|
||||
}
|
||||
|
Reference in New Issue
Block a user