Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / common / actions / rate-policy.cpp
index 58db624d8312814bff23b1fec56e78ee4d5c698a..25f8e4083387b11a53f0a74e92c4b6bcb4290306 100644 (file)
@@ -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.024695 seconds and 4 git commands to generate.