Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / common / event-rule / jul-logging.cpp
index 319a904a2f27d1a4d2f351882cf9b4905983cb3f..14fa179eba2276820f3099cb7c70594c05ec7f62 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/jul-logging-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/jul-logging-internal.hpp>
 #include <lttng/event.h>
 #include <lttng/log-level-rule.h>
 
@@ -421,7 +421,7 @@ static struct lttng_event *lttng_event_rule_jul_logging_generate_lttng_event(
        jul_logging = container_of(
                        rule, const struct lttng_event_rule_jul_logging, parent);
 
-       local_event = (lttng_event *) zmalloc(sizeof(*local_event));
+       local_event = zmalloc<lttng_event>();
        if (!local_event) {
                goto error;
        }
@@ -561,7 +561,7 @@ struct lttng_event_rule *lttng_event_rule_jul_logging_create(void)
        struct lttng_event_rule_jul_logging *tp_rule;
        enum lttng_event_rule_status status;
 
-       tp_rule = (lttng_event_rule_jul_logging *) zmalloc(sizeof(struct lttng_event_rule_jul_logging));
+       tp_rule = zmalloc<lttng_event_rule_jul_logging>();
        if (!tp_rule) {
                goto end;
        }
This page took 0.023657 seconds and 4 git commands to generate.