From 7dcf8f4bf74a194cadb484d34aec708c9c984491 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Mon, 15 Nov 2021 10:08:04 +0100 Subject: [PATCH] update(userspace/engine): use s_ prefix for static var. Signed-off-by: Federico Di Pierro Co-authored-by: Mark Stemm --- userspace/engine/falco_engine.cpp | 4 ++-- userspace/engine/falco_engine.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/userspace/engine/falco_engine.cpp b/userspace/engine/falco_engine.cpp index 1fa4dc74..3ff29e3f 100644 --- a/userspace/engine/falco_engine.cpp +++ b/userspace/engine/falco_engine.cpp @@ -40,7 +40,7 @@ extern "C" { string lua_on_event = "on_event"; string lua_print_stats = "print_stats"; -const std::string falco_engine::m_default_ruleset = "falco-default-ruleset"; +const std::string falco_engine::s_default_ruleset = "falco-default-ruleset"; using namespace std; @@ -63,7 +63,7 @@ falco_engine::falco_engine(bool seed_rng, const std::string& alternate_lua_dir) srandom((unsigned) getpid()); } - m_default_ruleset_id = find_ruleset_id(m_default_ruleset); + m_default_ruleset_id = find_ruleset_id(s_default_ruleset); } falco_engine::~falco_engine() diff --git a/userspace/engine/falco_engine.h b/userspace/engine/falco_engine.h index 36491d80..fd13c109 100644 --- a/userspace/engine/falco_engine.h +++ b/userspace/engine/falco_engine.h @@ -78,16 +78,16 @@ public: // be passed as an argument to process_event(). This allows // for different sets of rules being active at once. // - void enable_rule(const std::string &substring, bool enabled, const std::string &ruleset = m_default_ruleset); + void enable_rule(const std::string &substring, bool enabled, const std::string &ruleset = s_default_ruleset); // Like enable_rule, but the rule name must be an exact match. - void enable_rule_exact(const std::string &rule_name, bool enabled, const std::string &ruleset = m_default_ruleset); + void enable_rule_exact(const std::string &rule_name, bool enabled, const std::string &ruleset = s_default_ruleset); // // Enable/Disable any rules with any of the provided tags (set, exact matches only) // - void enable_rule_by_tag(const std::set &tags, bool enabled, const std::string &ruleset = m_default_ruleset); + void enable_rule_by_tag(const std::set &tags, bool enabled, const std::string &ruleset = s_default_ruleset); // Only load rules having this priority or more severe. void set_min_priority(falco_common::priority_type priority); @@ -197,7 +197,7 @@ public: // void evttypes_for_ruleset(std::string &source, std::set &evttypes, - const std::string &ruleset = m_default_ruleset); + const std::string &ruleset = s_default_ruleset); // // Given a source and output string, return an @@ -266,7 +266,7 @@ private: double m_sampling_multiplier; std::string m_lua_main_filename = "rule_loader.lua"; - static const std::string m_default_ruleset; + static const std::string s_default_ruleset; uint32_t m_default_ruleset_id; std::string m_extra;