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
/
bin
/
lttng-sessiond
/
consumer.cpp
diff --git
a/src/bin/lttng-sessiond/consumer.cpp
b/src/bin/lttng-sessiond/consumer.cpp
index 238da05085739aaca35506b543b10380e89c1197..bdda3913597a7639150a67473517e92bf31f1180 100644
(file)
--- a/
src/bin/lttng-sessiond/consumer.cpp
+++ b/
src/bin/lttng-sessiond/consumer.cpp
@@
-49,7
+49,7
@@
char *setup_channel_trace_path(struct consumer_output *consumer,
* Allocate the string ourself to make sure we never exceed
* LTTNG_PATH_MAX.
*/
* Allocate the string ourself to make sure we never exceed
* LTTNG_PATH_MAX.
*/
- pathname =
(char *) zmalloc
(LTTNG_PATH_MAX);
+ pathname =
calloc<char>
(LTTNG_PATH_MAX);
if (!pathname) {
goto error;
}
if (!pathname) {
goto error;
}
@@
-429,7
+429,7
@@
struct consumer_socket *consumer_allocate_socket(int *fd)
LTTNG_ASSERT(fd);
LTTNG_ASSERT(fd);
- socket =
(consumer_socket *) zmalloc(sizeof(struct consumer_socket)
);
+ socket =
zmalloc<consumer_socket>(
);
if (socket == NULL) {
PERROR("zmalloc consumer socket");
goto error;
if (socket == NULL) {
PERROR("zmalloc consumer socket");
goto error;
@@
-520,7
+520,7
@@
struct consumer_output *consumer_create_output(enum consumer_dst_type type)
{
struct consumer_output *output = NULL;
{
struct consumer_output *output = NULL;
- output =
(consumer_output *) zmalloc(sizeof(struct consumer_output)
);
+ output =
zmalloc<consumer_output>(
);
if (output == NULL) {
PERROR("zmalloc consumer_output");
goto error;
if (output == NULL) {
PERROR("zmalloc consumer_output");
goto error;
This page took
0.024521 seconds
and
4
git commands to generate.