X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fstream.cpp;h=fbecdc55804acdc151732a17188b13fa1b969186;hb=0114db0ec2407029052eb61a0189c9b1cd64d520;hp=aba160bfa473c5ac401f9e62a55482839e3c837d;hpb=c9e313bc594f40a86eed237dce222c0fc99c957f;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/stream.cpp b/src/bin/lttng-relayd/stream.cpp index aba160bfa..fbecdc558 100644 --- a/src/bin/lttng-relayd/stream.cpp +++ b/src/bin/lttng-relayd/stream.cpp @@ -54,7 +54,7 @@ struct relay_stream *stream_get_by_id(uint64_t stream_id) DBG("Relay stream %" PRIu64 " not found", stream_id); goto end; } - stream = caa_container_of(node, struct relay_stream, node); + stream = lttng::utils::container_of(node, &relay_stream::node); if (!stream_get(stream)) { stream = NULL; } @@ -580,7 +580,7 @@ struct relay_stream *stream_create(struct ctf_trace *trace, bool acquired_reference = false; struct lttng_trace_chunk *current_trace_chunk; - stream = (relay_stream *) zmalloc(sizeof(struct relay_stream)); + stream = zmalloc(); if (stream == NULL) { PERROR("relay stream zmalloc"); goto error_no_alloc; @@ -760,7 +760,7 @@ static void stream_destroy(struct relay_stream *stream) static void stream_destroy_rcu(struct rcu_head *rcu_head) { struct relay_stream *stream = - caa_container_of(rcu_head, struct relay_stream, rcu_node); + lttng::utils::container_of(rcu_head, &relay_stream::rcu_node); stream_destroy(stream); } @@ -772,7 +772,7 @@ static void stream_destroy_rcu(struct rcu_head *rcu_head) static void stream_release(struct urcu_ref *ref) { struct relay_stream *stream = - caa_container_of(ref, struct relay_stream, ref); + lttng::utils::container_of(ref, &relay_stream::ref); struct relay_session *session; session = stream->trace->session;