Skip to content

Commit 42280d2

Browse files
committed
Make function argument const pointer
1 parent c3c2c6f commit 42280d2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: headers/modsecurity/rules_exceptions.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class RulesExceptions {
5353
bool contains(int a);
5454
bool merge(RulesExceptions *from);
5555

56-
bool loadRemoveRuleByMsg(const std::string &msg, std::string *error);
57-
bool loadRemoveRuleByTag(const std::string &msg, std::string *error);
56+
bool loadRemoveRuleByMsg(const std::string &msg, const std::string *error);
57+
bool loadRemoveRuleByTag(const std::string &msg, const std::string *error);
5858

5959
bool loadUpdateTargetByMsg(const std::string &msg,
6060
std::unique_ptr<std::vector<std::unique_ptr<variables::Variable> > > v,

Diff for: src/rules_exceptions.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ bool RulesExceptions::loadUpdateActionById(double id,
5858

5959

6060
bool RulesExceptions::loadRemoveRuleByMsg(const std::string &msg,
61-
std::string *error) {
61+
const std::string *error) {
6262
m_remove_rule_by_msg.push_back(msg);
6363

6464
return true;
6565
}
6666

6767

6868
bool RulesExceptions::loadRemoveRuleByTag(const std::string &msg,
69-
std::string *error) {
69+
const std::string *error) {
7070
m_remove_rule_by_tag.push_back(msg);
7171

7272
return true;

0 commit comments

Comments
 (0)