Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: Modernize C++ struct/enum/union declarations #1588

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
78 changes: 39 additions & 39 deletions test/drivers/event_class/event_class.cpp

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions test/drivers/start_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define KMOD_NAME "scap"

scap_t* event_test::s_scap_handle = NULL;
static enum falcosecurity_log_severity severity_level = FALCOSECURITY_LOG_SEV_WARNING;
static falcosecurity_log_severity severity_level = FALCOSECURITY_LOG_SEV_WARNING;

int remove_kmod()
{
Expand Down Expand Up @@ -79,7 +79,7 @@ int insert_kmod(const std::string& kmod_path)
return EXIT_SUCCESS;
}

void abort_if_already_configured(const struct scap_vtable* vtable)
void abort_if_already_configured(const scap_vtable* vtable)
{
if(vtable != nullptr)
{
Expand All @@ -88,7 +88,7 @@ void abort_if_already_configured(const struct scap_vtable* vtable)
}
}

void test_open_log_fn(const char* component, const char* msg, const enum falcosecurity_log_severity sev)
void test_open_log_fn(const char* component, const char* msg, falcosecurity_log_severity sev)
{
if(sev <= severity_level)
{
Expand Down Expand Up @@ -143,11 +143,11 @@ int open_engine(int argc, char** argv)
{0, 0, 0, 0}};

// They should live until we call 'scap_open'
struct scap_modern_bpf_engine_params modern_bpf_params = {0};
struct scap_bpf_engine_params bpf_params = {0};
struct scap_kmod_engine_params kmod_params = {0};
scap_modern_bpf_engine_params modern_bpf_params = {0};
scap_bpf_engine_params bpf_params = {0};
scap_kmod_engine_params kmod_params = {0};
int ret = 0;
const struct scap_vtable* vtable = nullptr;
const scap_vtable* vtable = nullptr;
scap_open_args oargs = {};
oargs.log_fn = test_open_log_fn;
unsigned long buffer_bytes_dim = DEFAULT_DRIVER_BUFFER_BYTES_DIM;
Expand Down Expand Up @@ -279,7 +279,7 @@ int open_engine(int argc, char** argv)
std::cerr << "Invalid logging level. Valid range is '" << std::to_string(FALCOSECURITY_LOG_SEV_FATAL) <<"' <= lev <= '" << std::to_string(FALCOSECURITY_LOG_SEV_TRACE) << "'" << std::endl;
return EXIT_FAILURE;
}
severity_level = (enum falcosecurity_log_severity)level;
severity_level = (falcosecurity_log_severity)level;
}
break;

Expand Down