sessiond: ust_id_tracker_node: use lttng::utils::container_of
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 22 Jul 2024 19:56:56 +0000 (19:56 +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: I6c45b7d5138152728f67885ac5cc00ea1bc1603a
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/trace-ust.cpp

index 8937dd2056d87a13e917ac63692a1d73ae92a4b9..07e228d61a23874e380403ff4f421247f69afd17 100644 (file)
@@ -721,8 +721,9 @@ error:
 
 static void destroy_id_tracker_node_rcu(struct rcu_head *head)
 {
-       struct ust_id_tracker_node *tracker_node =
-               caa_container_of(head, struct ust_id_tracker_node, node.head);
+       auto *wrapper_node = lttng::utils::container_of(head, &lttng_ht_node_ulong::head);
+       auto *tracker_node = lttng::utils::container_of(wrapper_node, &ust_id_tracker_node::node);
+
        free(tracker_node);
 }
 
This page took 0.025813 seconds and 4 git commands to generate.