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
/
ust-consumer
/
ust-consumer.cpp
diff --git
a/src/common/ust-consumer/ust-consumer.cpp
b/src/common/ust-consumer/ust-consumer.cpp
index 5e9a442eb5058a98584c432d3bcebb351c25f683..766c9d30c7ff27f1a7ff796043f24aaf2a3ad90a 100644
(file)
--- a/
src/common/ust-consumer/ust-consumer.cpp
+++ b/
src/common/ust-consumer/ust-consumer.cpp
@@
-407,7
+407,7
@@
static int create_ust_channel(struct lttng_consumer_channel *channel,
nr_stream_fds = 1;
else
nr_stream_fds = lttng_ust_ctl_get_nr_stream_per_channel();
nr_stream_fds = 1;
else
nr_stream_fds = lttng_ust_ctl_get_nr_stream_per_channel();
- stream_fds =
(int *) zmalloc(nr_stream_fds * sizeof(*stream_fds)
);
+ stream_fds =
calloc<int>(nr_stream_fds
);
if (!stream_fds) {
ret = -1;
goto error_alloc;
if (!stream_fds) {
ret = -1;
goto error_alloc;
@@
-1286,7
+1286,7
@@
int lttng_ustconsumer_recv_metadata(int sock, uint64_t key, uint64_t offset,
DBG("UST consumer push metadata key %" PRIu64 " of len %" PRIu64, key, len);
DBG("UST consumer push metadata key %" PRIu64 " of len %" PRIu64, key, len);
- metadata_str =
(char *) zmalloc(len * sizeof(char)
);
+ metadata_str =
calloc<char>(len
);
if (!metadata_str) {
PERROR("zmalloc metadata string");
ret_code = LTTCOMM_CONSUMERD_ENOMEM;
if (!metadata_str) {
PERROR("zmalloc metadata string");
ret_code = LTTCOMM_CONSUMERD_ENOMEM;
This page took
0.034537 seconds
and
4
git commands to generate.