Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / common / actions / rate-policy.cpp
index d0834dd732e14c2f203897b7dc743dbb137307bf..25f8e4083387b11a53f0a74e92c4b6bcb4290306 100644 (file)
@@ -5,15 +5,15 @@
  *
  */
 
-#include <common/buffer-view.h>
-#include <common/dynamic-buffer.h>
-#include <common/error.h>
-#include <common/macros.h>
-#include <common/mi-lttng.h>
-#include <common/payload-view.h>
-#include <common/payload.h>
+#include <common/buffer-view.hpp>
+#include <common/dynamic-buffer.hpp>
+#include <common/error.hpp>
+#include <common/macros.hpp>
+#include <common/mi-lttng.hpp>
+#include <common/payload-view.hpp>
+#include <common/payload.hpp>
 #include <limits.h>
-#include <lttng/action/rate-policy-internal.h>
+#include <lttng/action/rate-policy-internal.hpp>
 #include <lttng/action/rate-policy.h>
 #include <stdbool.h>
 #include <sys/types.h>
@@ -487,7 +487,7 @@ struct lttng_rate_policy *lttng_rate_policy_every_n_create(uint64_t interval)
                goto end;
        }
 
-       policy = (lttng_rate_policy_every_n *) zmalloc(sizeof(struct lttng_rate_policy_every_n));
+       policy = zmalloc<lttng_rate_policy_every_n>();
        if (!policy) {
                goto end;
        }
@@ -702,7 +702,7 @@ struct lttng_rate_policy *lttng_rate_policy_once_after_n_create(
                goto end;
        }
 
-       policy = (lttng_rate_policy_once_after_n *) zmalloc(sizeof(struct lttng_rate_policy_once_after_n));
+       policy = zmalloc<lttng_rate_policy_once_after_n>();
        if (!policy) {
                goto end;
        }
This page took 0.024683 seconds and 4 git commands to generate.