sessiond: relay_session: use lttng::utils::container_of
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 22 Jul 2024 19:08:00 +0000 (19:08 +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: I0fb69c7132665ea0ee3067445884ec1115ba9872
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/session.cpp

index c199efcd1055214405c1dbb3b242879e91b31223..06dcbf2a8c1a004f77fab2fe57a9723831470d96 100644 (file)
@@ -559,7 +559,7 @@ end:
 
 static void rcu_destroy_session(struct rcu_head *rcu_head)
 {
-       struct relay_session *session = caa_container_of(rcu_head, struct relay_session, rcu_node);
+       auto *session = lttng::utils::container_of(rcu_head, &relay_session::rcu_node);
        /*
         * Since each trace has a reference on the session, it means
         * that if we are at the point where we teardown the session, no
This page took 0.025749 seconds and 4 git commands to generate.