Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / lib / lttng-ctl / tracker.cpp
index 53deced1d36172bb678e40234149dcae23b6b8b4..4930e94ce57610469f9fcc9558425556b31d3cfd 100644 (file)
@@ -53,7 +53,7 @@ enum lttng_error_code lttng_session_get_tracker_handle(const char *session_name,
                goto error;
        }
 
-       handle = (lttng_process_attr_tracker_handle *) zmalloc(sizeof(*handle));
+       handle = zmalloc<lttng_process_attr_tracker_handle>();
        if (!handle) {
                ret_code = LTTNG_ERR_NOMEM;
                goto error;
@@ -779,7 +779,7 @@ int lttng_list_tracker_pids(struct lttng_handle *handle,
                goto end;
        }
 
-       pid_array = (int32_t *) zmalloc(pid_count * sizeof(int32_t));
+       pid_array = calloc<int32_t>(pid_count);
        if (!pid_array) {
                ret_code = LTTNG_ERR_NOMEM;
                goto end;
This page took 0.022603 seconds and 4 git commands to generate.