refactor(usersapace): adapt to changes libs

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
Jason Dellaluce
2024-02-20 09:21:24 +00:00
committed by poiana
parent 4ed11d90a4
commit b515f0a079
4 changed files with 4 additions and 6 deletions

View File

@@ -58,10 +58,8 @@ struct falco_source
inline bool is_field_defined(const std::string& field) const
{
auto *chk = filter_factory->new_filtercheck(field.c_str());
if (chk)
if (filter_factory->new_filtercheck(field.c_str()) != nullptr)
{
delete(chk);
return true;
}
return false;

View File

@@ -439,7 +439,7 @@ bool rule_loader::compiler::compile_condition(
sinsp_filter_compiler compiler(filter_factory, ast_out.get());
try
{
filter_out.reset(compiler.compile());
filter_out = std::move(compiler.compile());
}
catch(const sinsp_exception& e)
{

View File

@@ -172,7 +172,7 @@ falco::app::run_result falco::app::actions::init_inspectors(falco::app::state& s
if (is_input)
{
auto gen_check = src_info->inspector->new_generic_filtercheck();
src_info->filterchecks->add_filter_check(gen_check);
src_info->filterchecks->add_filter_check(std::move(gen_check));
}
used_plugins.insert(plugin->name());
}

View File

@@ -362,7 +362,7 @@ void stats_writer::collector::get_metrics_output_fields_additional(
auto buffer = inspector->get_sinsp_stats_v2_buffer();
auto sinsp_stats_v2 = inspector->get_sinsp_stats_v2();
sinsp_thread_manager* thread_manager = inspector->m_thread_manager;
sinsp_thread_manager* thread_manager = inspector->m_thread_manager.get();
const scap_stats_v2* sinsp_stats_v2_snapshot = libsinsp::stats::get_sinsp_stats_v2(flags, agent_info, thread_manager, sinsp_stats_v2, buffer, &nstats, &rc);
uint32_t base_stat = 0;