Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a45a633

Browse files
FedeDPsgaist
andauthoredNov 22, 2024··
update(userspace/falco): use ternary operator
Co-authored-by: Samuel Gaist <[email protected]> Signed-off-by: Federico Di Pierro <[email protected]>
1 parent f5a4503 commit a45a633

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed
 

‎userspace/falco/app/actions/helpers_inspector.cpp

+3-9
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,9 @@ falco::app::run_result falco::app::actions::open_live_inspector(falco::app::stat
6161
falco_logger::log(
6262
falco_logger::level::INFO,
6363
"Opening '" + source + "' source with plugin '" + cfg->m_name + "'");
64-
if(s.config->m_plugins_hostinfo) {
65-
inspector->open_plugin(cfg->m_name,
66-
cfg->m_open_params,
67-
sinsp_plugin_platform::SINSP_PLATFORM_HOSTINFO);
68-
} else {
69-
inspector->open_plugin(cfg->m_name,
70-
cfg->m_open_params,
71-
sinsp_plugin_platform::SINSP_PLATFORM_GENERIC);
72-
}
64+
inspector->open_plugin(cfg->m_name,
65+
cfg->m_open_params,
66+
s.config->m_plugins_hostinfo ? sinsp_plugin_platform::SINSP_PLATFORM_HOSTINFO : sinsp_plugin_platform::SINSP_PLATFORM_GENERIC);
7367
return run_result::ok();
7468
}
7569
}

0 commit comments

Comments
 (0)
Please sign in to comment.