*
*/
-#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;
rule, i, &exclusion_str);
LTTNG_ASSERT(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK);
- copy_ret = lttng_strncpy(exclusions->names[i], exclusion_str,
- LTTNG_SYMBOL_NAME_LEN);
+ copy_ret = lttng_strncpy(
+ LTTNG_EVENT_EXCLUSION_NAME_AT(exclusions, i),
+ exclusion_str,
+ sizeof(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusions, i)));
if (copy_ret) {
free(exclusions);
exclusions = NULL;
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;
}