*
*/
-#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/optional.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/user-tracepoint-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/optional.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/user-tracepoint-internal.hpp>
#include <lttng/event.h>
#include <lttng/log-level-rule.h>
goto end;
}
- exclusions = (lttng_event_exclusion *) zmalloc(sizeof(struct lttng_event_exclusion) +
- (LTTNG_SYMBOL_NAME_LEN * nb_exclusions));
+ exclusions = zmalloc<lttng_event_exclusion>(sizeof(struct lttng_event_exclusion) + (LTTNG_SYMBOL_NAME_LEN * nb_exclusions));
if (!exclusions) {
PERROR("Failed to allocate exclusions buffer");
ret_status = LTTNG_EVENT_RULE_GENERATE_EXCLUSIONS_STATUS_OUT_OF_MEMORY;
struct lttng_event_rule_user_tracepoint *tp_rule;
enum lttng_event_rule_status status;
- tp_rule = (lttng_event_rule_user_tracepoint *) zmalloc(sizeof(struct lttng_event_rule_user_tracepoint));
+ tp_rule = zmalloc<lttng_event_rule_user_tracepoint>();
if (!tp_rule) {
goto end;
}