From c46ebf9f47d4d06403b2688596f7124229a53800 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 22 Jul 2024 19:58:33 +0000 Subject: [PATCH] sessiond: ust_app_event: use lttng::utils::container_of MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: Ica13ae34db7c0fd04118d0e80c7ae71b77f66ad6 Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/ust-app.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/bin/lttng-sessiond/ust-app.cpp b/src/bin/lttng-sessiond/ust-app.cpp index c28f568ae..108812772 100644 --- a/src/bin/lttng-sessiond/ust-app.cpp +++ b/src/bin/lttng-sessiond/ust-app.cpp @@ -179,14 +179,11 @@ static void copy_channel_attr_to_ustctl(struct lttng_ust_ctl_consumer_channel_at */ static int ht_match_ust_app_event(struct cds_lfht_node *node, const void *_key) { - struct ust_app_event *event; - const struct ust_app_ht_key *key; - LTTNG_ASSERT(node); LTTNG_ASSERT(_key); - event = caa_container_of(node, struct ust_app_event, node.node); - key = (ust_app_ht_key *) _key; + auto *event = lttng_ht_node_container_of(node, &ust_app_event::node); + const auto *key = (ust_app_ht_key *) _key; /* Match the 4 elements of the key: name, filter, loglevel, exclusions */ -- 2.34.1