Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / bin / lttng-sessiond / rotation-thread.cpp
index 2f89fbc64ee875f8e94f5efc78b34e6a57648575..ee924ba98f042ee83a7f80f5d0737c95630d867a 100644 (file)
@@ -89,7 +89,7 @@ struct rotation_thread_timer_queue *rotation_thread_timer_queue_create(void)
 {
        struct rotation_thread_timer_queue *queue = NULL;
 
 {
        struct rotation_thread_timer_queue *queue = NULL;
 
-       queue = (rotation_thread_timer_queue *) zmalloc(sizeof(*queue));
+       queue = zmalloc<rotation_thread_timer_queue>();
        if (!queue) {
                PERROR("Failed to allocate timer rotate queue");
                goto end;
        if (!queue) {
                PERROR("Failed to allocate timer rotate queue");
                goto end;
@@ -134,7 +134,7 @@ struct rotation_thread_handle *rotation_thread_handle_create(
 {
        struct rotation_thread_handle *handle;
 
 {
        struct rotation_thread_handle *handle;
 
-       handle = (rotation_thread_handle *) zmalloc(sizeof(*handle));
+       handle = zmalloc<rotation_thread_handle>();
        if (!handle) {
                goto end;
        }
        if (!handle) {
                goto end;
        }
@@ -193,7 +193,7 @@ void rotation_thread_enqueue_job(struct rotation_thread_timer_queue *queue,
                goto end;
        }
 
                goto end;
        }
 
-       job = (rotation_thread_job *) zmalloc(sizeof(struct rotation_thread_job));
+       job = zmalloc<rotation_thread_job>();
        if (!job) {
                PERROR("Failed to allocate rotation thread job of type \"%s\" for session \"%s\"",
                                job_type_str, session->name);
        if (!job) {
                PERROR("Failed to allocate rotation thread job of type \"%s\" for session \"%s\"",
                                job_type_str, session->name);
This page took 0.023215 seconds and 4 git commands to generate.