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
/
common
/
index-allocator.cpp
diff --git
a/src/common/index-allocator.cpp
b/src/common/index-allocator.cpp
index 7fe18eb1862cd41674b38c359d425de62f1365ad..1f7b3e05208d3cfb6fa60785f4db7218f57f7588 100644
(file)
--- a/
src/common/index-allocator.cpp
+++ b/
src/common/index-allocator.cpp
@@
-32,7
+32,7
@@
struct lttng_index_allocator *lttng_index_allocator_create(
{
struct lttng_index_allocator *allocator = NULL;
{
struct lttng_index_allocator *allocator = NULL;
- allocator =
(lttng_index_allocator *) zmalloc(sizeof(*allocator)
);
+ allocator =
zmalloc<lttng_index_allocator>(
);
if (!allocator) {
PERROR("Failed to allocate index allocator");
goto end;
if (!allocator) {
PERROR("Failed to allocate index allocator");
goto end;
@@
-92,7
+92,7
@@
enum lttng_index_allocator_status lttng_index_allocator_release(
LTTNG_ASSERT(idx < allocator->size);
LTTNG_ASSERT(idx < allocator->size);
- index =
(lttng_index *) zmalloc(sizeof(*index)
);
+ index =
zmalloc<lttng_index>(
);
if (!index) {
PERROR("Failed to allocate free index queue");
status = LTTNG_INDEX_ALLOCATOR_STATUS_ERROR;
if (!index) {
PERROR("Failed to allocate free index queue");
status = LTTNG_INDEX_ALLOCATOR_STATUS_ERROR;
This page took
0.023736 seconds
and
4
git commands to generate.