projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add type-checked versions of allocation and deallocations functions
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
tracker.cpp
diff --git
a/src/lib/lttng-ctl/tracker.cpp
b/src/lib/lttng-ctl/tracker.cpp
index 53deced1d36172bb678e40234149dcae23b6b8b4..4930e94ce57610469f9fcc9558425556b31d3cfd 100644
(file)
--- a/
src/lib/lttng-ctl/tracker.cpp
+++ b/
src/lib/lttng-ctl/tracker.cpp
@@
-53,7
+53,7
@@
enum lttng_error_code lttng_session_get_tracker_handle(const char *session_name,
goto error;
}
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;
if (!handle) {
ret_code = LTTNG_ERR_NOMEM;
goto error;
@@
-779,7
+779,7
@@
int lttng_list_tracker_pids(struct lttng_handle *handle,
goto end;
}
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;
if (!pid_array) {
ret_code = LTTNG_ERR_NOMEM;
goto end;
This page took
0.023679 seconds
and
4
git commands to generate.