diff --git a/examples/syscall_extract/plugin.cpp b/examples/syscall_extract/plugin.cpp index c4cdff0..d1dce93 100644 --- a/examples/syscall_extract/plugin.cpp +++ b/examples/syscall_extract/plugin.cpp @@ -57,9 +57,14 @@ class my_plugin { using ft = falcosecurity::field_value_type; return { - {ft::FTYPE_BOOL, "sample.is_open", "Is Open Type", + {ft::FTYPE_BOOL, + "sample.is_open", + "Is Open Type", "Value is true if event is of open family", - {}, false, {}, true}, // use as suggested output format + {}, + false, + {}, + true}, // use as suggested output format {ft::FTYPE_UINT64, "sample.open_count", "Open Type Count", "Counter for all the events of open family in the event's " "thread thread"}, diff --git a/include/falcosecurity/async_event_handler.h b/include/falcosecurity/async_event_handler.h index a05decf..6c8af76 100644 --- a/include/falcosecurity/async_event_handler.h +++ b/include/falcosecurity/async_event_handler.h @@ -34,8 +34,7 @@ class async_event_handler async_event_handler( falcosecurity::_internal::ss_plugin_owner_t* o, const falcosecurity::_internal::ss_plugin_async_event_handler_t h): - m_owner(o), - m_handler(h), m_writer() + m_owner(o), m_handler(h), m_writer() { } FALCOSECURITY_INLINE @@ -83,8 +82,7 @@ class async_event_handler_factory async_event_handler_factory( falcosecurity::_internal::ss_plugin_owner_t* o, const falcosecurity::_internal::ss_plugin_async_event_handler_t h): - m_owner(o), - m_handler(h) + m_owner(o), m_handler(h) { } FALCOSECURITY_INLINE diff --git a/include/falcosecurity/inputs.h b/include/falcosecurity/inputs.h index d18a593..555800d 100644 --- a/include/falcosecurity/inputs.h +++ b/include/falcosecurity/inputs.h @@ -35,8 +35,7 @@ class table_init_input FALCOSECURITY_INLINE table_init_input(_internal::ss_plugin_owner_t* o, const _internal::ss_plugin_init_input* i): - m_owner(o), - m_input(i), + m_owner(o), m_input(i), m_fielder(i->tables->fields_ext, i->owner, i->get_owner_last_error), m_reader(i->tables->reader_ext, i->owner, i->get_owner_last_error), m_writer(i->tables->writer_ext, i->owner, i->get_owner_last_error) @@ -200,8 +199,7 @@ class parse_event_input parse_event_input(const falcosecurity::event_reader& er, const falcosecurity::table_reader& tr, const falcosecurity::table_writer& tw): - m_evt_reader(er), - m_table_reader(tr), m_table_writer(tw) + m_evt_reader(er), m_table_reader(tr), m_table_writer(tw) { } FALCOSECURITY_INLINE @@ -243,8 +241,7 @@ class extract_fields_input FALCOSECURITY_INLINE extract_fields_input(const falcosecurity::event_reader& er, const falcosecurity::table_reader& tr): - m_evt_reader(er), - m_table_reader(tr), m_extract_request(nullptr) + m_evt_reader(er), m_table_reader(tr), m_extract_request(nullptr) { } FALCOSECURITY_INLINE diff --git a/include/falcosecurity/internal/plugin_mixin_async.h b/include/falcosecurity/internal/plugin_mixin_async.h index 308a074..885d024 100644 --- a/include/falcosecurity/internal/plugin_mixin_async.h +++ b/include/falcosecurity/internal/plugin_mixin_async.h @@ -138,8 +138,8 @@ template class plugin_mixin_async : public Base private: template - FALCOSECURITY_INLINE auto _get_async_event_sources(T* o) - -> decltype(o->get_async_event_sources()) + FALCOSECURITY_INLINE auto + _get_async_event_sources(T* o) -> decltype(o->get_async_event_sources()) { static_assert( std::is_same (T::*)(), @@ -156,8 +156,8 @@ template class plugin_mixin_async : public Base } template - FALCOSECURITY_INLINE auto _stop_async_events(T* o) - -> decltype(o->stop_async_events()) + FALCOSECURITY_INLINE auto + _stop_async_events(T* o) -> decltype(o->stop_async_events()) { static_assert(std::is_same::value, diff --git a/include/falcosecurity/internal/plugin_mixin_common.h b/include/falcosecurity/internal/plugin_mixin_common.h index ef84a93..cfc4d96 100644 --- a/include/falcosecurity/internal/plugin_mixin_common.h +++ b/include/falcosecurity/internal/plugin_mixin_common.h @@ -184,8 +184,8 @@ template class plugin_mixin_common : public Plugin auto _destroy(...) -> void {} template - FALCOSECURITY_INLINE auto _get_required_api_version(T* o) - -> decltype(o->get_required_api_version()) + FALCOSECURITY_INLINE auto + _get_required_api_version(T* o) -> decltype(o->get_required_api_version()) { static_assert( std::is_same class plugin_mixin_common : public Plugin } template - FALCOSECURITY_INLINE auto _get_init_schema(T* o) - -> decltype(o->get_init_schema()) + FALCOSECURITY_INLINE auto + _get_init_schema(T* o) -> decltype(o->get_init_schema()) { static_assert(std::is_same::value, @@ -219,8 +219,8 @@ template class plugin_mixin_common : public Plugin } template - FALCOSECURITY_INLINE auto _get_last_error(T* o) - -> decltype(o->get_last_error()) + FALCOSECURITY_INLINE auto + _get_last_error(T* o) -> decltype(o->get_last_error()) { static_assert(std::is_same::value, diff --git a/include/falcosecurity/internal/plugin_mixin_extraction.h b/include/falcosecurity/internal/plugin_mixin_extraction.h index 9b6b5f8..dca3c2c 100644 --- a/include/falcosecurity/internal/plugin_mixin_extraction.h +++ b/include/falcosecurity/internal/plugin_mixin_extraction.h @@ -147,8 +147,8 @@ template class plugin_mixin_extraction : public Base private: template - FALCOSECURITY_INLINE auto _get_extract_event_sources(T* o) - -> decltype(o->get_extract_event_sources()) + FALCOSECURITY_INLINE auto + _get_extract_event_sources(T* o) -> decltype(o->get_extract_event_sources()) { static_assert( std::is_same (T::*)(), @@ -165,8 +165,8 @@ template class plugin_mixin_extraction : public Base } template - FALCOSECURITY_INLINE auto _get_extract_event_types(T* o) - -> decltype(o->get_extract_event_types()) + FALCOSECURITY_INLINE auto + _get_extract_event_types(T* o) -> decltype(o->get_extract_event_types()) { static_assert( std::is_same (T::*)(), diff --git a/include/falcosecurity/internal/plugin_mixin_parsing.h b/include/falcosecurity/internal/plugin_mixin_parsing.h index ef6d8ab..74586b6 100644 --- a/include/falcosecurity/internal/plugin_mixin_parsing.h +++ b/include/falcosecurity/internal/plugin_mixin_parsing.h @@ -99,8 +99,8 @@ template class plugin_mixin_parsing : public Base private: template - FALCOSECURITY_INLINE auto _get_parse_event_sources(T* o) - -> decltype(o->get_parse_event_sources()) + FALCOSECURITY_INLINE auto + _get_parse_event_sources(T* o) -> decltype(o->get_parse_event_sources()) { static_assert( std::is_same (T::*)(), @@ -117,8 +117,8 @@ template class plugin_mixin_parsing : public Base } template - FALCOSECURITY_INLINE auto _get_parse_event_types(T* o) - -> decltype(o->get_parse_event_types()) + FALCOSECURITY_INLINE auto + _get_parse_event_types(T* o) -> decltype(o->get_parse_event_types()) { static_assert( std::is_same (T::*)(), diff --git a/include/falcosecurity/internal/plugin_mixin_sourcing.h b/include/falcosecurity/internal/plugin_mixin_sourcing.h index b04b0d4..b916437 100644 --- a/include/falcosecurity/internal/plugin_mixin_sourcing.h +++ b/include/falcosecurity/internal/plugin_mixin_sourcing.h @@ -97,8 +97,8 @@ class plugin_instance_mixin : public PluginInstance private: template - FALCOSECURITY_INLINE auto _get_progress(std::string& fmt, T* o) - -> decltype(o->get_progress(fmt)) + FALCOSECURITY_INLINE auto + _get_progress(std::string& fmt, T* o) -> decltype(o->get_progress(fmt)) { static_assert(std::is_same::value, @@ -251,8 +251,8 @@ template class plugin_mixin_sourcing : public Base auto _get_id(...) -> uint32_t { return 0; } template - FALCOSECURITY_INLINE auto _get_event_source(T* o) - -> decltype(o->get_event_source()) + FALCOSECURITY_INLINE auto + _get_event_source(T* o) -> decltype(o->get_event_source()) { static_assert(std::is_same::value, @@ -264,8 +264,8 @@ template class plugin_mixin_sourcing : public Base auto _get_event_source(...) -> std::string { return ""; } template - FALCOSECURITY_INLINE auto _list_open_params(T* o) - -> decltype(o->list_open_params()) + FALCOSECURITY_INLINE auto + _list_open_params(T* o) -> decltype(o->list_open_params()) { static_assert(std::is_same (T::*)(), decltype(&T::list_open_params)>::value, diff --git a/include/falcosecurity/internal/symbols_common.h b/include/falcosecurity/internal/symbols_common.h index 70338df..ef5e0c2 100644 --- a/include/falcosecurity/internal/symbols_common.h +++ b/include/falcosecurity/internal/symbols_common.h @@ -35,16 +35,10 @@ limitations under the License. } \ \ FALCOSECURITY_EXPORT \ - const char* plugin_get_version() \ - { \ - return s_plugin_common.get_version(); \ - } \ + const char* plugin_get_version() { return s_plugin_common.get_version(); } \ \ FALCOSECURITY_EXPORT \ - const char* plugin_get_name() \ - { \ - return s_plugin_common.get_name(); \ - } \ + const char* plugin_get_name() { return s_plugin_common.get_name(); } \ \ FALCOSECURITY_EXPORT \ const char* plugin_get_description() \ @@ -53,10 +47,7 @@ limitations under the License. } \ \ FALCOSECURITY_EXPORT \ - const char* plugin_get_contact() \ - { \ - return s_plugin_common.get_contact(); \ - } \ + const char* plugin_get_contact() { return s_plugin_common.get_contact(); } \ \ FALCOSECURITY_EXPORT \ const char* plugin_get_init_schema(ss_plugin_schema_type* st) \ diff --git a/include/falcosecurity/internal/symbols_sourcing.h b/include/falcosecurity/internal/symbols_sourcing.h index a4b17ba..4dc7b6a 100644 --- a/include/falcosecurity/internal/symbols_sourcing.h +++ b/include/falcosecurity/internal/symbols_sourcing.h @@ -29,10 +29,7 @@ limitations under the License. static plugin_mixin<__t> s_plugin_sourcing; \ \ FALCOSECURITY_EXPORT \ - uint32_t plugin_get_id() \ - { \ - return s_plugin_sourcing.get_id(); \ - } \ + uint32_t plugin_get_id() { return s_plugin_sourcing.get_id(); } \ \ FALCOSECURITY_EXPORT \ const char* plugin_get_event_source() \ diff --git a/include/falcosecurity/table.h b/include/falcosecurity/table.h index b61f277..9f5532b 100644 --- a/include/falcosecurity/table.h +++ b/include/falcosecurity/table.h @@ -74,8 +74,7 @@ class table_fields table_fields(const _internal::ss_plugin_table_fields_vtable_ext* f, _internal::ss_plugin_owner_t* o, const char* (*glerr)(_internal::ss_plugin_owner_t* o)): - m_fields(f), - m_owner(o), m_get_owner_last_error(glerr) + m_fields(f), m_owner(o), m_get_owner_last_error(glerr) { } FALCOSECURITY_INLINE @@ -103,8 +102,7 @@ class table_reader table_reader(const _internal::ss_plugin_table_reader_vtable_ext* r, _internal::ss_plugin_owner_t* o, const char* (*glerr)(_internal::ss_plugin_owner_t* o)): - m_reader(r), - m_owner(o), m_get_owner_last_error(glerr) + m_reader(r), m_owner(o), m_get_owner_last_error(glerr) { } FALCOSECURITY_INLINE @@ -133,8 +131,7 @@ class table_writer table_writer(const _internal::ss_plugin_table_writer_vtable_ext* w, _internal::ss_plugin_owner_t* o, const char* (*glerr)(_internal::ss_plugin_owner_t* o)): - m_writer(w), - m_owner(o), m_get_owner_last_error(glerr) + m_writer(w), m_owner(o), m_get_owner_last_error(glerr) { } FALCOSECURITY_INLINE @@ -189,15 +186,13 @@ class table_entry FALCOSECURITY_INLINE table_entry(_internal::ss_plugin_table_entry_t* e, _internal::ss_plugin_table_t* t, const table_reader& r): - m_entry(e), - m_table(t), m_reader(&r) + m_entry(e), m_table(t), m_reader(&r) { } FALCOSECURITY_INLINE table_entry(_internal::ss_plugin_table_entry_t* e, _internal::ss_plugin_table_t* t, const table_reader* r): - m_entry(e), - m_table(t), m_reader(r) + m_entry(e), m_table(t), m_reader(r) { } @@ -258,8 +253,7 @@ class table_stale_entry FALCOSECURITY_INLINE table_stale_entry(_internal::ss_plugin_table_entry_t* e, _internal::ss_plugin_table_t* t, const table_writer& w): - m_entry(e), - m_table(t), m_writer(&w) + m_entry(e), m_table(t), m_writer(&w) { } @@ -284,8 +278,7 @@ class table_field FALCOSECURITY_INLINE table_field(const std::string& n, _internal::ss_plugin_state_type ft, _internal::ss_plugin_table_field_t* f): - m_name(n), - m_field_type(ft), m_field(f) + m_name(n), m_field_type(ft), m_field(f) { } FALCOSECURITY_INLINE @@ -417,8 +410,7 @@ class table FALCOSECURITY_INLINE table(const std::string& n, _internal::ss_plugin_state_type kt, _internal::ss_plugin_table_t* t): - m_name(n), - m_key_type(kt), m_table(t), m_data() + m_name(n), m_key_type(kt), m_table(t), m_data() { } FALCOSECURITY_INLINE diff --git a/include/falcosecurity/types.h b/include/falcosecurity/types.h index d42a642..1c38fff 100644 --- a/include/falcosecurity/types.h +++ b/include/falcosecurity/types.h @@ -154,11 +154,10 @@ struct field_info FALCOSECURITY_INLINE field_info(field_value_type t, const std::string& n, const std::string& di, const std::string& de, const field_arg& a = field_arg(), - bool l = false, const std::vector& p = {}, bool o = false): - type(t), - name(n), list(l), arg(a), display(di), description(de), - properties(p), - addOutput(o) + bool l = false, const std::vector& p = {}, + bool o = false): + type(t), name(n), list(l), arg(a), display(di), description(de), + properties(p), addOutput(o) { } FALCOSECURITY_INLINE @@ -187,8 +186,7 @@ struct open_param FALCOSECURITY_INLINE open_param(const std::string& v, const std::string& d, const std::string& s = ";"): - value(v), - description(d), separator(s) + value(v), description(d), separator(s) { } FALCOSECURITY_INLINE @@ -215,8 +213,7 @@ struct metric const metric_value v = metric_value(), const metric_value_type vt = metric_value_type::SS_PLUGIN_METRIC_VALUE_TYPE_U64): - name(n), - type(t), value(v), value_type(vt) + name(n), type(t), value(v), value_type(vt) { } FALCOSECURITY_INLINE