Skip to content

Commit

Permalink
update(userspace/falco): use ternary operator
Browse files Browse the repository at this point in the history
Co-authored-by: Samuel Gaist <[email protected]>
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP and sgaist authored Nov 22, 2024
1 parent f5a4503 commit a45a633
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions userspace/falco/app/actions/helpers_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,9 @@ falco::app::run_result falco::app::actions::open_live_inspector(falco::app::stat
falco_logger::log(
falco_logger::level::INFO,
"Opening '" + source + "' source with plugin '" + cfg->m_name + "'");
if(s.config->m_plugins_hostinfo) {
inspector->open_plugin(cfg->m_name,
cfg->m_open_params,
sinsp_plugin_platform::SINSP_PLATFORM_HOSTINFO);
} else {
inspector->open_plugin(cfg->m_name,
cfg->m_open_params,
sinsp_plugin_platform::SINSP_PLATFORM_GENERIC);
}
inspector->open_plugin(cfg->m_name,
cfg->m_open_params,
s.config->m_plugins_hostinfo ? sinsp_plugin_platform::SINSP_PLATFORM_HOSTINFO : sinsp_plugin_platform::SINSP_PLATFORM_GENERIC);
return run_result::ok();
}
}
Expand Down

0 comments on commit a45a633

Please sign in to comment.