Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / common / event-rule / kernel-syscall.cpp
index 3f8e64ed804cd7ce98b1cd9579cfc10135586a60..d006eaa054960b29eeb59edf0e342cc60ba19459 100644 (file)
@@ -5,18 +5,18 @@
  *
  */
 
-#include <common/credentials.h>
-#include <common/error.h>
-#include <common/hashtable/hashtable.h>
-#include <common/hashtable/utils.h>
-#include <common/macros.h>
-#include <common/mi-lttng.h>
-#include <common/payload-view.h>
-#include <common/payload.h>
-#include <common/runas.h>
-#include <common/string-utils/string-utils.h>
-#include <lttng/event-rule/event-rule-internal.h>
-#include <lttng/event-rule/kernel-syscall-internal.h>
+#include <common/credentials.hpp>
+#include <common/error.hpp>
+#include <common/hashtable/hashtable.hpp>
+#include <common/hashtable/utils.hpp>
+#include <common/macros.hpp>
+#include <common/mi-lttng.hpp>
+#include <common/payload-view.hpp>
+#include <common/payload.hpp>
+#include <common/runas.hpp>
+#include <common/string-utils/string-utils.hpp>
+#include <lttng/event-rule/event-rule-internal.hpp>
+#include <lttng/event-rule/kernel-syscall-internal.hpp>
 
 #define IS_SYSCALL_EVENT_RULE(rule) \
        (lttng_event_rule_get_type(rule) == LTTNG_EVENT_RULE_TYPE_KERNEL_SYSCALL)
@@ -220,7 +220,8 @@ lttng_event_rule_kernel_syscall_get_internal_filter_bytecode(
 }
 
 static enum lttng_event_rule_generate_exclusions_status
-lttng_event_rule_kernel_syscall_generate_exclusions(const struct lttng_event_rule *rule,
+lttng_event_rule_kernel_syscall_generate_exclusions(
+               const struct lttng_event_rule *rule __attribute__((unused)),
                struct lttng_event_exclusion **exclusions)
 {
        /* Unsupported. */
@@ -355,7 +356,7 @@ struct lttng_event_rule *lttng_event_rule_kernel_syscall_create(
                goto end;
        }
 
-       syscall_rule = (lttng_event_rule_kernel_syscall *) zmalloc(sizeof(struct lttng_event_rule_kernel_syscall));
+       syscall_rule = zmalloc<lttng_event_rule_kernel_syscall>();
        if (!syscall_rule) {
                goto end;
        }
This page took 0.023922 seconds and 4 git commands to generate.