mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-11 11:39:32 +00:00
chore: pre-commit cleanup
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#include "test_falco_engine.h"
|
||||
|
||||
test_falco_engine::test_falco_engine():
|
||||
m_engine(std::make_shared<falco_engine>())
|
||||
{
|
||||
test_falco_engine::test_falco_engine(): m_engine(std::make_shared<falco_engine>()) {
|
||||
// create a falco engine ready to load the ruleset
|
||||
m_filter_factory = std::make_shared<sinsp_filter_factory>(&m_inspector, m_filterlist);
|
||||
m_formatter_factory = std::make_shared<sinsp_evt_formatter_factory>(&m_inspector, m_filterlist);
|
||||
|
@@ -471,22 +471,21 @@ struct convert<nlohmann::json> {
|
||||
res.emplace_back(sub);
|
||||
}
|
||||
break;
|
||||
case YAML::NodeType::Scalar:
|
||||
{
|
||||
int int_val;
|
||||
double double_val;
|
||||
bool bool_val;
|
||||
std::string str_val;
|
||||
if(YAML::convert<int>::decode(node, int_val)) {
|
||||
res = int_val;
|
||||
} else if(YAML::convert<double>::decode(node, double_val)) {
|
||||
res = double_val;
|
||||
} else if(YAML::convert<bool>::decode(node, bool_val)) {
|
||||
res = bool_val;
|
||||
} else if(YAML::convert<std::string>::decode(node, str_val)) {
|
||||
res = str_val;
|
||||
}
|
||||
case YAML::NodeType::Scalar: {
|
||||
int int_val;
|
||||
double double_val;
|
||||
bool bool_val;
|
||||
std::string str_val;
|
||||
if(YAML::convert<int>::decode(node, int_val)) {
|
||||
res = int_val;
|
||||
} else if(YAML::convert<double>::decode(node, double_val)) {
|
||||
res = double_val;
|
||||
} else if(YAML::convert<bool>::decode(node, bool_val)) {
|
||||
res = bool_val;
|
||||
} else if(YAML::convert<std::string>::decode(node, str_val)) {
|
||||
res = str_val;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -74,7 +74,7 @@ public:
|
||||
}
|
||||
|
||||
// Return the output's name as per its configuration.
|
||||
const std::string &get_name() const { return m_oc.name; }
|
||||
const std::string& get_name() const { return m_oc.name; }
|
||||
|
||||
// Output a message.
|
||||
virtual void output(const message* msg) = 0;
|
||||
|
@@ -20,7 +20,10 @@ limitations under the License.
|
||||
|
||||
#define CHECK_RES(fn) res = res == CURLE_OK ? fn : res
|
||||
|
||||
static size_t noop_write_callback(void */*contents*/, size_t size, size_t nmemb, void */*userp*/) {
|
||||
static size_t noop_write_callback(void * /*contents*/,
|
||||
size_t size,
|
||||
size_t nmemb,
|
||||
void * /*userp*/) {
|
||||
// We don't want to echo anything. Just return size of bytes ignored
|
||||
return size * nmemb;
|
||||
}
|
||||
|
Reference in New Issue
Block a user