Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / bin / lttng-relayd / sessiond-trace-chunks.cpp
index 18ef586d00c85d62e5b92bfbc083979dc32e5bf6..68a5e454f8afba796a4aeaa3e86a0ddcbe2cfdaf 100644 (file)
@@ -5,17 +5,17 @@
  *
  */
 
-#include "sessiond-trace-chunks.h"
+#include "sessiond-trace-chunks.hpp"
 #include <urcu.h>
 #include <urcu/rculfhash.h>
 #include <urcu/ref.h>
-#include <common/macros.h>
-#include <common/hashtable/hashtable.h>
-#include <common/hashtable/utils.h>
-#include <common/trace-chunk-registry.h>
-#include <common/defaults.h>
-#include <common/error.h>
-#include <common/string-utils/format.h>
+#include <common/macros.hpp>
+#include <common/hashtable/hashtable.hpp>
+#include <common/hashtable/utils.hpp>
+#include <common/trace-chunk-registry.hpp>
+#include <common/defaults.hpp>
+#include <common/error.hpp>
+#include <common/string-utils/format.hpp>
 #include <stdio.h>
 #include <inttypes.h>
 
@@ -197,7 +197,7 @@ int trace_chunk_registry_ht_element_create(
                goto end;
        }
 
-       new_element = (trace_chunk_registry_ht_element *) zmalloc(sizeof(*new_element));
+       new_element = zmalloc<trace_chunk_registry_ht_element>();
        if (!new_element) {
                ret = -1;
                goto end;
@@ -263,7 +263,7 @@ end:
 struct sessiond_trace_chunk_registry *sessiond_trace_chunk_registry_create(void)
 {
        struct sessiond_trace_chunk_registry *sessiond_registry =
-                       (sessiond_trace_chunk_registry *) zmalloc(sizeof(*sessiond_registry));
+                       zmalloc<sessiond_trace_chunk_registry>();
 
        if (!sessiond_registry) {
                goto end;
This page took 0.024185 seconds and 4 git commands to generate.