consumerd: lttng_consumer_stream: use lttng::utils::container_of
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 22 Jul 2024 20:09:57 +0000 (20:09 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 30 Jul 2024 01:26:51 +0000 (01:26 +0000)
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.

Change-Id: I1b8075c3ab3bdda7a345c3278ee251c6f6ee1023
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/consumer/consumer.cpp

index 295ea2726e3c54e2991705cf3f90770652ebd082..22559052d231722772f57b6d0e8286288885cee7 100644 (file)
@@ -2414,7 +2414,7 @@ void *consumer_thread_metadata_poll(void *data)
                        node = lttng_ht_iter_get_node<lttng_ht_node_u64>(&iter);
                        LTTNG_ASSERT(node);
 
-                       stream = caa_container_of(node, struct lttng_consumer_stream, node);
+                       stream = lttng::utils::container_of(node, &lttng_consumer_stream::node);
 
                        if (revents & (LPOLLIN | LPOLLPRI)) {
                                /* Get the data out of the metadata file descriptor */
This page took 0.0267 seconds and 4 git commands to generate.