From: Jérémie Galarneau Date: Mon, 22 Jul 2024 19:11:32 +0000 (+0000) Subject: sessiond: ust_channel: use lttng::utils::container_of X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fdbc9b0aca0aa2f60f2381d7be70f93a396d8267;p=lttng-tools.git sessiond: ust_channel: use lttng::utils::container_of 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: Ib00bfa536d9412824d49f7c8bff429b0aa03762e Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/cmd.cpp b/src/bin/lttng-sessiond/cmd.cpp index 2d081a964..f2182f838 100644 --- a/src/bin/lttng-sessiond/cmd.cpp +++ b/src/bin/lttng-sessiond/cmd.cpp @@ -413,7 +413,7 @@ static enum lttng_error_code list_lttng_ust_global_events(char *channel_name, goto error; } - uchan = caa_container_of(&node->node, struct ltt_ust_channel, node.node); + uchan = lttng::utils::container_of(node, <t_ust_channel::node); channel_event_count = lttng_ht_get_count(uchan->events); if (channel_event_count == 0) {