Cosmetics: fix cppcheck warnings

This commit is contained in:
Felipe Zimmerle
2020-10-22 10:08:35 -03:00
parent 8da787a390
commit 4b425850cf
6 changed files with 12 additions and 9 deletions

View File

@@ -256,7 +256,7 @@ int ModSecurity::processContentOffset(const char *content, size_t len,
strlen("highlight"));
yajl_gen_array_open(g);
while (vars.size() > 0) {
while (vars.size() > 3) {
std::string value;
yajl_gen_map_open(g);
vars.pop_back();
@@ -303,7 +303,7 @@ int ModSecurity::processContentOffset(const char *content, size_t len,
varValue.size());
yajl_gen_map_close(g);
while (trans.size() > 0) {
while (!trans.empty()) {
modsecurity::actions::transformations::Transformation *t;
std::string varValueRes;
yajl_gen_map_open(g);
@@ -338,7 +338,7 @@ int ModSecurity::processContentOffset(const char *content, size_t len,
yajl_gen_map_open(g);
while (ops.size() > 0) {
while (ops.size() > 3) {
std::string value;
yajl_gen_string(g, reinterpret_cast<const unsigned char*>("highlight"),
strlen("highlight"));