sessiond: registry_session: mark functions as noexcept
[lttng-tools.git] / src / common / event-rule / user-tracepoint.cpp
index d6d166685421e08affd1222c884679c2dd164b53..48040fc59292384310ae1ac4fb19e0332266b08b 100644 (file)
@@ -5,19 +5,19 @@
  *
  */
 
-#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>
 
@@ -362,8 +362,7 @@ lttng_event_rule_user_tracepoint_generate_exclusions(
                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;
@@ -560,7 +559,7 @@ struct lttng_event_rule *lttng_event_rule_user_tracepoint_create(void)
        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;
        }
This page took 0.025143 seconds and 4 git commands to generate.